polygon intersection artifacts

can someone explain to me how these polygon intersection artifacts can be fixed?

I am assuming you are talking about the water and if so there is a simple solution because i had a similar problem programming games. It may have something to do with your clipping plane range settings. In my experience, when the clipping plane nearest setting is set to lower than 0.1f those artifacts become more and more prominent. I would suggest not going much lower than 0.1f. I am not entirely sure why this happenens but i bet it has something to do with the way OGL calculates pixels for the viewport.

hmmm thanks for your advice, but that’s not it. i am at 1.0f and it still looks like that. somehow the warcraft 3 engine gets rid of it completely

This is definitely your z buffer precision.

Push your near clip plane out as much as you can, and pull your far clip plane in as much as you can. Remember you can make them dynamic based on the tilt of the viewer to help out.

That will solve your problem. You could also try requesting a larger depth buffer in the pixel format descriptor.

thanks, i figured that out last night at 4 AM =)