Archived

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

phantom_

ask a simple question

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!


Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites