Archived

This topic is now archived and is closed to further replies.

Multitexturing without extensions - but avoiding z-fighting.

This topic is 5274 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 am finishing up the new version of my map editor and lightmapper, Cartography Shop. I am trying to display the lightmaps the program calculates, over the map textures. I tried drawing each object twice, but of course that causes z-fighting, even if I move the lightmap object away a little bit. Is there any way to do his without z-fighting, and if not, where can I download the appropriate extension, as well as documentation on what all the constants are?

Share this post


Link to post
Share on other sites
You might want to try changing the function that the depth test uses from less than to less than or equal and you can do this with
void glDepthFunc(GLenum func);
and the parameter func as GL_LEQUAL. You can use GL_LESS to cange it back to the default.

Share this post


Link to post
Share on other sites
It works! No z-fighting!

Thanks. Speed isn''t such an issue here, because it is an editor, so it might only render the scene once every ten seconds or so!

Share this post


Link to post
Share on other sites