Jump to content

  • Log In with Google      Sign In   
  • Create Account


Who can help me understanding OpenGl


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 gluPerspective   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 April 2002 - 08:43 PM

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 !!

Sponsor:

#2 IndirectX   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 April 2002 - 09:34 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS