Main Page | Report this Page
Computers Forum Index  »  Computer - Graphics - API (Opengl)  »  OpenGL graphic problem with height-map...
Page 1 of 1    

OpenGL graphic problem with height-map...

Author Message
...
Posted: Wed Aug 26, 2009 11:02 pm
Guest
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
 
fungus...
Posted: Wed Aug 26, 2009 11:02 pm
Guest
On Aug 26, 9:02 pm, andy_... at (no spam) hotmail.com wrote:
Quote:

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.
 
...
Posted: Thu Aug 27, 2009 3:06 pm
Guest
fungus <openglMYSOCKS at (no spam) artlum.com> writes:
Quote:
On Aug 26, 9:02 pm, andy_... at (no spam) 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.
 
 
Page 1 of 1    
All times are GMT
The time now is Sun Nov 29, 2009 5:40 am