added OpenGL implementation