I’ve just learned a little knowledge about OpenGL. And I would init an application just like this
glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(90.0, 960.0 / 640.0, 0.1, 50000); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(0.0, 0.0, 320.0 / tanf(PI * 90.0 / 360.0), 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
So my origin was always in the center of the window
–Different from OpenFrameworks
After long time reading of the OF’s src code, I guess maybe this is the key to change the position of the origin.
But till now I still can not find the true key to solve my problem.