change form SDL to OpenGL