• Advertisement

Archived

This topic is now archived and is closed to further replies.

Who can help me understanding OpenGl

This topic is 5752 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am new progarmmer in OpenGl /c++ 1-I ''id like to understand what metrics are using in glvertex (x,y,z) (pixel or what ??) 2-what do the gluPerspective command ? thank you !!

Share this post


Link to post
Share on other sites
Advertisement
glVertex doesn''t use any specific units. It is all relative to your projection and modelview transforms. Let''s say you are in ortho mode and your screen is from 0,0 to 10,10. Then x and y can range from 0 to 10 to be visible on screen. You can assign your coordinates any units you want; OpenGL doesn''t care about that a single bit. All it does is it transforms the vertices using the matrices you specified and writes them to screen.

gluPerspective sets up perspective transform. It basically sets up the matrices so that you have an environment that has perspective like the real world does: more distant objects appear smaller. The first parameter is field of view: how much of the world you can see at any single time. The second parameter is the aspect ratio, that is the ratio of width to height for your screen. The last two are near and far clipping distances. The geometry that is closer than the near or farther than the far clipping distance is not rendered. These parameters controls the depth buffer values.

Share this post


Link to post
Share on other sites

  • Advertisement