Advertisement

Interesting "feature"

Started by June 05, 2002 12:06 PM
2 comments, last by shaddowofadream 22 years, 8 months ago
I was playing around with the code from tutorial 6 from NeHe and discovered something rather strange... to do with the Z plane... I changed all the rotation values to random values changing within "int DrawGLScene(GLvoid)"... then to test out the maximum limits of the Z plane I incremented a value to see when it would ''disappear'' at 101.0f the texture displays something very strange... and looses its cube quality of before.... What im really asking is this natural or just specific to my computer, and is the limit of the Z plane similar on all computers ? "... We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far." - H.P. Lovecraft The Call to Cthulu
"... We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far." - H.P. Lovecraft The Call to Cthulu
From lesson 6:
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);

It''s the limit set in the program.

------------
aud.vze.com - The Audacious Engine <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.
_______________________________________Pixelante Game Studios - Fowl Language
Advertisement
thanx for pointing that out btw...

changed some more values around and it seems that between...

z= 400 onwards the difference is minimal... just wondering would it affect memory "alot" to have say max z of 500 and 5000 ????


also tested the Z over-run...
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,50.0f);

then
glTranslatef(0.0,0.0f,51.0f);
produces weird results...
hmm




[edited by - shaddowofadream on June 5, 2002 1:28:34 PM]
"... We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far." - H.P. Lovecraft The Call to Cthulu
quote:
Original post by shaddowofadream
if 100 is the set limit then howcome I can still see the image (even barely) at 101 ?



<shrug> Hard to tell without knowing exactly what you did. You probably have a glTranslate somewhere you''re not counting.

quote:

also is there a ''limit'' to the z plane ?



There is a limit set in the program, as LockePick told you. The only upper limit is the highest value you could pass into glPerspective (whatever the max value of a float is.) The depth buffer loses precision at values that large, though.

This topic is closed to new replies.

Advertisement