I have this terrain editor that I made and it’s based off triangle tiles right, so when you look at it from one direction and when u look at it from the back all the tiles are see thru, sort of, i took a picture… here is from the back, which is f’d up: http://members.cox.net/evilremy/q1.jpg
and here is from the front which is perfectly fine: http://members.cox.net/evilremy/q2.jpg
if anyone knows why it’s doing this I would greatly appreciate it, thanks.
no real idea, but are you sure that all your tris are oriented the same, meaning counterclockwise (or clockwise) ?
i think you did take care of that, but i have no other idea at the moment, sorry
perhaps some more details will help
what does it look like in wireframe or without texture?
Still looks an awful lot like a z problem. Make sure, you
a)Have a z buffer
b)Have z writes enabled (sanity check: glDepthMask(true); )
c)Have z test enabled (glEnable(GL_DEPTH_TEST);, glDepthFunc(GL_LEQUAL)
d)Clear z every frame (glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
e)Clear z to a sane value (best not to call glClearDepth at all …)
Also try enabling backface culling.
And last but not least, your screen shots are nice, but it’s kinda hard to see anything. I’d like to see a demonstration shot (of the problem) with as few polys as possible.
PS: Please don’t crosspost, you won’t make many friends around here by doing that.
[This message has been edited by zeckensack (edited 05-27-2002).]
yeah that worked, i guess at some point i had glDisable(GL_DEPTH_TEST). Anyway, thanks for the help, now the only problem I have is the menu disapears under the terrain when I go down too low, anyone know why that happens?
Originally posted by Xero_Tolerance: yeah that worked, i guess at some point i had glDisable(GL_DEPTH_TEST). Anyway, thanks for the help, now the only problem I have is the menu disapears under the terrain when I go down too low, anyone know why that happens?
Hmm, maybe the depth test again? Just disable the test before rendering the menus and reenable it before rendering the terrain.
Or just make sure your menu is perfectly aligned with your near plane, then you won’t have to fiddle around with the depth test