Home > Back-end >  The use of Opengl GL_PROJECTION and GL_MODELVIEW successively.
The use of Opengl GL_PROJECTION and GL_MODELVIEW successively.

Time:09-24

I have seen in some project in the family use GL_PROJECTION and GL_MODELVIEW, sometimes with GL_PROJECTION first after using GL_MODELVIEW, sometimes using GL_MODELVIEW, first use GL_PROJECTION, after I put the two for, or in accordance with the examples of online order change, the result can't see images, the following is an example of an online, switch, can't see images,
GlMatrixMode (GL_PROJECTION);//this GL_MODELVIEW used in front and GL_PROJECTION in front of what is the difference between
?GlLoadIdentity ();
GluPerspective (45, thewire, 0.01, 100);
GlViewport (0, 0, m_WinWidth, m_WinHeigh);

GlMatrixMode (GL_MODELVIEW);//this GL_MODELVIEW used in front and GL_PROJECTION in front of what is the difference between
?GlLoadIdentity ();
GluLookAt (camera. Camera_x, camera camera_y, camera. Camera_z,
Camera. Lookat_x, camera lookat_y, camera. Lookat_z,
0.0 f, f, 1.0 to 0.0 f);


CodePudding user response:

Nobody ah, their top one
  • Related