Archived

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

halo9

Multitexturing without extensions - but avoiding z-fighting.

Recommended Posts

halo9    122
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
Yohumbus    152
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
halo9    122
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