f



OpenGL graphic problem with height-map

Hi Newsgroup!

I'm a beginner in using OpenGL and i've coded some sample height map to
extend my skills. The data for each height came from srtm and the whole
height map consist of triangles (GL_TRIANGLES)

The map look's good (at the first moment) but there are some strange
display issues. If you look at
http://test.wittnet.at/andy/height_map.jpg you can see what i mean.

Some triangles are missing at the peaks and if i move the map those
missing triangles will move too. If i flatten the map, for testing
purposes, those peaks will disappear.

Can somebody please give me a hint how to solve this or a similar
problem?

Thanks
0
andy_x86
8/26/2009 7:02:26 PM
comp.graphics.api.opengl 7074 articles. 1 followers. Post Follow

2 Replies
726 Views

Similar Articles

[PageSpeed] 30

On Aug 26, 9:02=A0pm, andy_...@hotmail.com wrote:
>
> Some triangles are missing at the peaks and if i move the map those
> missing triangles will move too. If i flatten the map, for testing
> purposes, those peaks will disappear.
>

You set the near/far values badly in your perspective
function.

This means you don't have enough depth buffer precision
for the graphics card to figure out which polygon is in
front.

--
<\___/>
/ O O \
\_____/  FTB.

0
fungus
8/26/2009 7:14:45 PM
fungus <openglMYSOCKS@artlum.com> writes:
> On Aug 26, 9:02 pm, andy_...@hotmail.com wrote:
>>
>> Some triangles are missing at the peaks and if i move the map those
>> missing triangles will move too. If i flatten the map, for testing
>> purposes, those peaks will disappear.
>>
>
> You set the near/far values badly in your perspective
> function.
>
> This means you don't have enough depth buffer precision
> for the graphics card to figure out which polygon is in
> front.

Thanks for your help. This was the problem! glEnable(GL_DEPTH_TEST)
wasn't set correctly too.
0
andy_x86
8/27/2009 11:06:55 AM
Reply: