ask a simple question

Started by
5 comments, last by phantom_ 19 years, 12 months ago
When i study the lession 2,the function glVertex3f( 0.0f, 1.0f, 0.0f); but i do not know the 1.0 unit is how much pixel with the screen! i am a fresh man! have someone can answer me ,thanks!!
Advertisement
Depends on what projection you are using, and the parameters for that projection.

You have to remember that you''re unique, just like everybody else.
If at first you don't succeed, redefine success.
Don''t think of it as pixels, think of it as feet (or meters or whatever) in the 3D world you''re drawing. You shouldn''t care how many pixels it is because that depends on resolution, windowsize, whatever.
The screen itself is ( 0.0f, 0.0f, 0.0f)
I think both the height and the width are 10.0f.

Though I could be wrong,
-BLades
yes.i think you are right! With my 17# monitor and when i set the glTranslatef(0.0f,0.0f,0.0f),x=10.0f of y=10.0f,it will can not be seen! but in the different moniter is it will be change ?
i don''t know!


See the OpenGL view as a view, which is scaled over the window you''re drawing to. If the window is bigger (but with the same proportions) the view will be exactly the same as it is just scaled with a larger amount (however it will cover more pixels so drawing will be slower). If you have a larger monitor, the view will just be scaled again, it does not change in any other way.

WWW.TREEPENGUIN.TK
Your coordinate system and limits depend on:

- what you pass to glViewport
- what you pass to gluPerspective

Coordinates do not have a direct correlation to pixels, your window is just a view into whatever coordinate system you set up. Download tutor_x86.zip and tutor_dat.zip from this clicky and then run projection.exe and adjust the values in gluPerspective to see what I mean.
Brianmiserere nostri Domine miserere nostri

This topic is closed to new replies.

Advertisement