|
Dear all,
I am trying to use the stencil buffer for the first time,
and my test is not really succesfull so far...
Here is the code I've been added in my "init" function. I am working in Java with JOGL, but I don't think that this is the issue.
After this code, I would expect that nothing can be drawn on my screen..., since:
1) I clear the buffer with "1"
2) I use the glStencilFunc with GL_NEVER.
[CODE]
gl.glEnable(GL2GL_STENCIL_TEST);
gl.glClearStencil(0x1);
gl.glClear(GL2.GL_STENCIL_BUFFER_BIT);
gl.glStencilFunc(GL2.GL_NEVER, 0x1, 0x1);
gl.glStencilOp(GL2.GL_KEEP, GL2.GL_KEEP, GL2.GL_KEEP);
[/CODE]
Unfortunately, I can change whatever I want to the stencil function,
I always have all my objects being displaied on screen.
What am I missing ?
Thanks for help,
Loic
|