Archived

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

Interesting "feature"

This topic is 5674 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites