06-13-2003, 08:10 AM
Hi,
I use glut and in the display function, I clear the stencil buffer and draw some geometry with stencil test on. after that I want to clear the stencil buffer immediately. I use
glClearStencil(0X0);
glClear(Stencil_buffer_bit);
then I read the stencil buffer but it is same. I need to use stencil test multiple times during the display function.
How to clear it during display? so I can use it for next stencil test.
I use glut and in the display function, I clear the stencil buffer and draw some geometry with stencil test on. after that I want to clear the stencil buffer immediately. I use
glClearStencil(0X0);
glClear(Stencil_buffer_bit);
then I read the stencil buffer but it is same. I need to use stencil test multiple times during the display function.
How to clear it during display? so I can use it for next stencil test.