Size limits
I was wondering why OpenGL doesn''t accept a value below 0.1f (it does but if anything below 0.1f is encountered then it makes it 0.1f). For example when defining a polygon:
glVertex3f(0.01f,0.01f,0.01f); would have the same effect as
glVertex3f(0.1f,0.1f,0.1f);. Probally I''m wrong but I tried creating a polygon with height 0.01f and it just gave me a polygon with height 0.1f.
Could some1 also please tell me what the mathematical equivalent to 1 GL unit is?
Sorry for the dumb@$$ questions but I''m a dumb@$$ newbie ;-)
P@yce
-----------------------------"Q: How many Microsoft engineers does it take to change a light bulb?A: None. Bill Gates will just redefine Darkness(TM) as the new industry standard. "~wUn LoVe tO aLl ThE mAlUs OuT tHeRe!~
quote:
Probally I''m wrong but I tried creating a polygon with height 0.01f and it just gave me a polygon with height 0.1f.
I''m pretty sure you''re wrong there.... perhaps you could post code?
quote:
Could some1 also please tell me what the mathematical equivalent to 1 GL unit is?
If you mean is one unit one foot, or one meter, or whatever.... OpenGL does not define what a "unit" is equal to. You can use it for anything you want... pick what fits best in the context of your game engine.
November 26, 2001 02:14 PM
glBegin(GL_QUADS);
glVertex3f(-.8f, .8f, 0.1f);
glVertex3f( .8f, .8f, 0.1f);
glVertex3f( .8f,-0.01f, 0.1f);
glVertex3f(-.8f,-0.01f, 0.1f);
glEnd();
would have the same effect as
glVertex3f(-.8f, .8f, 0.1f);
glVertex3f( .8f, .8f, 0.1f);
glVertex3f( .8f,-0.1f, 0.1f);
glVertex3f(-.8f,-0.1f, 0.1f);
glEnd();
Tks a lot buddy... I appreciate it.
L8r
glVertex3f(-.8f, .8f, 0.1f);
glVertex3f( .8f, .8f, 0.1f);
glVertex3f( .8f,-0.01f, 0.1f);
glVertex3f(-.8f,-0.01f, 0.1f);
glEnd();
would have the same effect as
glVertex3f(-.8f, .8f, 0.1f);
glVertex3f( .8f, .8f, 0.1f);
glVertex3f( .8f,-0.1f, 0.1f);
glVertex3f(-.8f,-0.1f, 0.1f);
glEnd();
Tks a lot buddy... I appreciate it.
L8r
glBegin(GL_QUADS);
glVertex3f(-.8f, .8f, 0.1f);
glVertex3f( .8f, .8f, 0.1f);
glVertex3f( .8f,-0.01f, 0.1f);
glVertex3f(-.8f,-0.01f, 0.1f);
glEnd();
would have the same effect as
glVertex3f(-.8f, .8f, 0.1f);
glVertex3f( .8f, .8f, 0.1f);
glVertex3f( .8f,-0.1f, 0.1f);
glVertex3f(-.8f,-0.1f, 0.1f);
glEnd();
Tks a lot buddy... I appreciate it.
L8r
glVertex3f(-.8f, .8f, 0.1f);
glVertex3f( .8f, .8f, 0.1f);
glVertex3f( .8f,-0.01f, 0.1f);
glVertex3f(-.8f,-0.01f, 0.1f);
glEnd();
would have the same effect as
glVertex3f(-.8f, .8f, 0.1f);
glVertex3f( .8f, .8f, 0.1f);
glVertex3f( .8f,-0.1f, 0.1f);
glVertex3f(-.8f,-0.1f, 0.1f);
glEnd();
Tks a lot buddy... I appreciate it.
L8r
-----------------------------"Q: How many Microsoft engineers does it take to change a light bulb?A: None. Bill Gates will just redefine Darkness(TM) as the new industry standard. "~wUn LoVe tO aLl ThE mAlUs OuT tHeRe!~
About the GL unit... I mean if I were measuring the distance between 1.0 and 2.0 on the screen how many centimeters would it be?
Tks again
Tks again
-----------------------------"Q: How many Microsoft engineers does it take to change a light bulb?A: None. Bill Gates will just redefine Darkness(TM) as the new industry standard. "~wUn LoVe tO aLl ThE mAlUs OuT tHeRe!~
November 26, 2001 02:32 PM
about GL units:
it depends on your projection matrix...
if you use the identity matrix as projection matrix you''ve got orthographic projection and two units equal the height/widh of your viewport
if you use perspective projection the size of objects seems to decrease with the distance like in the real world
it depends on your projection matrix...
if you use the identity matrix as projection matrix you''ve got orthographic projection and two units equal the height/widh of your viewport
if you use perspective projection the size of objects seems to decrease with the distance like in the real world

if you mean if you have two points, 1 unit away how far away would it be on the screen, the answer is it depends. If it is close the distance is bigger, if it is further away the distance is smaller.
hope that makes sense!
------------------------------
Baldur K
hope that makes sense!
------------------------------
Baldur K
Email Einstein about his Theory of Relativity. The bottom line is, that in 3d space, there is NO absolute size. "Size" is always relative to one thing or another. You''re standing in a matrix-style white space. You are looking directly at a giant with no other objects around. Now how can you tell that it''s a giant unless you have something to compare it to (an ant, for example lol) Did that make sense?
---------------
I finally got it all together...
...and then forgot where I put it.
---------------
I finally got it all together...
...and then forgot where I put it.
November 26, 2001 02:56 PM
What is Einstein''s email address? heheh.
The stuff didn''t make complete sense to me... so your saying the distance between 1.0 and 2.0 on the x-axis is always variable?
Someone help me with the code too.
Tks!
The stuff didn''t make complete sense to me... so your saying the distance between 1.0 and 2.0 on the x-axis is always variable?
Someone help me with the code too.
Tks!
Think about it this way: 3 centimeters is always 3 centimeters. But if you walk 3 kilometers away from a 3-cm long piece of string, then hold a ruler to your eye, the string''s not gonna fill 3 centimeters on the ruler.
Since usually you use OpenGL to approximate 3d space, then of course this would hold true.
Since usually you use OpenGL to approximate 3d space, then of course this would hold true.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement