Jump to content
  • Advertisement
Sign in to follow this  
xwskx

textures on a terrain surface

This topic is 4237 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have some problems with a project i'm working on. The project uses digital terrain files to create a terrain, and an arbitruary image can be place on the terrain surface. To keep the program simple i decide to just render the terrain and create another mesh with the textures applied to it on the terrain surface. This caused some depth test issue, so i used gldisable(GL_DEPTH_TEST). This works great when ur looking at the text top down, but when i look at it the hills from the surface, the polygons in the rear bleed through. So tried using GLPolygon_offset_FILL, it works most of the time. But for certain angles the polygons disappears; like the image below. I'm out of ideas, so any insight or advice on this issue will be great thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
this is my code for drawing the textures is there something i'm missing?

glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1,-1);
while(head)
{
DrawTextureNode(head);
head = head->Next;
}
glDisable(GL_POLYGON_OFFSET_FILL);

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!