Advertisement

Who can help me understanding OpenGl

Started by April 23, 2002 02:43 AM
0 comments, last by gluPerspective 22 years, 7 months ago
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 !!
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.
---visit #directxdev on afternet <- not just for directx, despite the name

This topic is closed to new replies.

Advertisement