Odd problem -- try to bare with me

Started by
7 comments, last by neurokaotix 20 years, 5 months ago
I''m away from my computer right now and therefore cannot supply you with anything useful such as a screenshot or code but I can describe my problem and hopefully I can get some feedback on it. When I render a couple meshes and make them move along the z axis, they appear to be rendered in reverse order for some reason. By reverse order I mean although one mesh is actually further in 3D space than the other, the one that is furthest from the camera is being rendered in front of the one that is closer. Needless to say it''s very odd and I don''t know why it''s doing it. Any suggestions or pointers into the right direction would be very appreciated! Thanks James Simmons MindEngine Development http://medev.sourceforge.net
Advertisement
Perhaps your projection or model-view matrix is fubared and is flipping the transformed Z values.

Or perhaps your depth comparison function is set incorrectly.

Or perhaps depth comparison is not enabled, and your objects are just appearing in reverse drawing order.

Or perhaps something else. Post code.

"Sneftel is correct, if rather vulgar." --Flarelocke
Thanks sneftel, like I said I don''t have access to the code right now or I''d post it but I like where you''re going with this. I''m going to try the things you said and hopefully it''ll work out!

James Simmons
MindEngine Development
http://medev.sourceforge.net
make sure depth_test is enabled

are you changing anything in the buffers? watch that stuff
--FirekingOwner/LeaderFiregames Development &Blackdragon Studios
And if depth test is enables, what is the depthfunc

GL_LEQUAL??
Should not the topic title be "...try to bear with me"?
[ PGD - The Home of Pascal Game Development! ] [ Help GameDev.net fight cancer ]
quote:Original post by Useless Hacker
Should not the topic title be "...try to bear with me"?


You are as your name would suggest.

James Simmons
MindEngine Development
http://medev.sourceforge.net
quote:Original post by Useless Hacker
Should not the topic title be "...try to bear with me"?


maybe he wants us all to get naked so that we arent destracted by human trappings to consider his problem?

Anyways, I concur with the people above, its def a z-buffer issue, could you have disabled z-writes for some reason and forgot to turn ''em back on?
quote:Original post by neurokaotix
quote:Original post by Useless Hacker
Should not the topic title be "...try to bear with me"?


You are as your name would suggest.
My point was, you said bare when you meant bear. "Try to bare with me" is like "Try to get naked with me"
[ PGD - The Home of Pascal Game Development! ] [ Help GameDev.net fight cancer ]

This topic is closed to new replies.

Advertisement