hello,
i made a mistake in my previus post caused by the Z buffer. in fact, the stencil buffer does not look active now.
anyway, i cant find your change in the sources. and in the curent cvs, i don't see in gemWinCreateXwin.cpp the creation of the stencil buffer.
attachement is my test patch
cyrille
IOhannes m zmölnig a écrit :
cyrille henry wrote:
james tittle a écrit :
On Mar 7, 2006, at 7:55 AM, cyrille henry wrote:
the buffer is now active, and the red square of the example is not draw when the test is active. now, i'm tryng to clear the stencil buffer in order to be able to draw a shape in this buffer.
this exemple patch does not work.
btw, i have committed a change some time ago which i believe to enable the stencil buffer (at least on linux); could you try again?
mfg.adsr IOhannaes
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
#N canvas 405 92 741 639 10; #X obj 64 50 gemhead 44; #X obj 64 495 translateXYZ 0 0 -1; #X obj 64 28 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 64 470 GEMglStencilOp; #X obj 64 380 GEMglStencilFunc; #X floatatom 172 470 5 0 0 0 - - -; #X obj 157 436 GLdefine GL_KEEP; #X obj 165 415 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 211 289 5 0 0 0 - - -; #X obj 203 244 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 203 265 GLdefine GL_NEVER; #X msg 171 354 1; #X obj 331 242 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 331 265 GLdefine GL_ALWAYS; #X obj 157 218 loadbang; #X obj 64 546 square 3; #X obj 64 520 color 1 0 0; #X text 197 126 enable the stencil buffer; #X msg 451 51 create , 1; #X msg 459 76 0 , destroy; #X obj 64 124 GEMglEnable; #X floatatom 147 124 5 0 0 0 - - -; #X obj 136 80 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 136 103 GLdefine GL_STENCIL_TEST; #X obj 167 74 loadbang; #X obj 64 203 translateXYZ; #X floatatom 90 182 5 0 0 0 - - -; #X floatatom 129 182 5 0 0 0 - - -; #X floatatom 168 182 5 0 0 0 - - -; #X floatatom 342 294 5 0 0 0 - - -; #X obj 451 99 gemwin; #X text 230 327 the red square should not be seen , unless setting the StencilFunc to "GL_ALWAYS".; #X connect 0 0 20 0; #X connect 1 0 16 0; #X connect 2 0 0 0; #X connect 3 0 1 0; #X connect 4 0 3 0; #X connect 6 0 5 0; #X connect 6 0 3 1; #X connect 6 0 3 2; #X connect 6 0 3 3; #X connect 7 0 6 0; #X connect 9 0 10 0; #X connect 10 0 8 0; #X connect 10 0 4 1; #X connect 11 0 4 3; #X connect 11 0 4 2; #X connect 12 0 13 0; #X connect 13 0 4 1; #X connect 13 0 29 0; #X connect 14 0 10 0; #X connect 14 0 6 0; #X connect 14 0 11 0; #X connect 16 0 15 0; #X connect 18 0 30 0; #X connect 19 0 30 0; #X connect 20 0 25 0; #X connect 22 0 23 0; #X connect 23 0 21 0; #X connect 23 0 20 1; #X connect 24 0 23 0; #X connect 25 0 4 0; #X connect 26 0 25 1; #X connect 27 0 25 2; #X connect 28 0 25 3;