Stencil buffer problem

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.
 gl.glEnable(GL2[i][SIZE=2]GL_STENCIL_TEST[/SIZE][/i][SIZE=2][/SIZE]);

gl.[u]glClearStencil[/u](0x1);
 
gl.glClear(GL2.
[i][SIZE=2]GL_STENCIL_BUFFER_BIT[/SIZE][/i][SIZE=2][/SIZE]);	    

gl.glStencilFunc(GL2.
[i][SIZE=2]GL_NEVER[/SIZE][/i][SIZE=2][/SIZE], 0x1, 0x1);	    

gl.glStencilOp(GL2.
[i][SIZE=2]GL_KEEP[/SIZE][/i][SIZE=2][/SIZE], GL2.[i][SIZE=2]GL_KEEP[/SIZE][/i][SIZE=2][/SIZE], GL2.[i][SIZE=2]GL_KEEP[/SIZE][/i][SIZE=2][/SIZE]);

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

never mind,
it seems that the problem is due to the fact that I can not create a canvas with simultaniously the Stencil buffer and the Stereo (Quard) Buffers
If I disable the Stereo flag, it works fine