updated for opengl window