glPolygonOffset & stencil buffer problem?

I have two polygons that are coplanar so I use glPolygonOffset, which works great. But, here is my problem: When I draw these polygons using the stencil buffer (clearing the stencil buffer after each one), the polygon offset doesn’t seem to work anymore.

Does this problem sound familiar to anyone?


Could you be a little more specific, because I’m not exactly sure what it is you are trying to do? Why do you clear the stencil buffer after drawing each polygon? What are you using the stencil buffer for?

Regards Anders

[This message has been edited by GameMaker (edited 11-14-2002).]

I am drawing a capping texture on the cut-out part of the models.

BTW: Is clearing the stencil buffer a fast operation? Right now I clear the stencil buffer between drawing each object.

I could use a different bit for each object that I am stenciling and then draw the capping for each one at the end of the entire stenciling process. But that sounds a lot more complicated.