terrain z-sorting problem

Started by
6 comments, last by IDispatch 22 years, 1 month ago
Hello all, I hope you can help me with this problem...Here how it goes: 1. I have a 2D array representing the height map. 2. Now I draw the terrain using triangle strips. 3. Everything till now is perfect... now when i start moving around the terrain... polygon sorting doesn't work properly... BUT in one case "if i am facing the terrain from the NORTH" moving forward and backward everything is perfect... any other direction sorting gets messy.... Any ideas what I have done wrong? Do I have to do sorting manually? Any suggestions. Thanks in advance, IDispatch Edited by - IDispatch on February 18, 2002 4:54:23 AM Edited by - idispatch on February 20, 2002 4:58:17 AM Edited by - idispatch on February 20, 2002 4:59:04 AM
Advertisement
You could try to enable the Z-buffer.

Or you must sort the terrain.
--------------------------------"I'm a half time coder, full time Britney Spears addict" Targhan
It''s already enabled

glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
turn on back face culling also glDepthMask(1)

http://uk.geocities.com/sloppyturds/gotterdammerung.html
zedzeek, Unfortunately that didn't work either..
Anyway I am posting an image of the problem i am having... hope this can clarify it a bit.


Tha image above shows part of the terrain while I am moving closer to it... You should clearly see the depth problem I am talking about....

Regards,
IDispatch

Edited by - IDispatch on February 19, 2002 2:41:20 AM
Comon people..... I really need your help on this.
*** SOS ***
I believe I found the answer... it was my near plane setting, it was close to zero. I made it 1 and now everything is working just fine..

This topic is closed to new replies.

Advertisement