siliconprime-chinh / opengles-book-samples

Automatically exported from code.google.com/p/opengles-book-samples
0 stars 0 forks source link

StencilTest WebGL example doesn't reset stencil mask #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Viewing the StencilTest example in 
WebGL/Chapter_11/Stencil_Test/Stencil_Test.html on my laptop (GL_VENDOR reports 
"Mesa DRI Intel(R) Ironlake Mobile x86/MMX/SSE2") displays the proper frame the 
first time Draw() is called, and then displays solid green for subsequent 
frames.

The issue seems to be that the WebGL context doesn't reset the stencil 
(espcially glStencilMask) between frames.  The attached patch fixes the problem.

Original issue reported on code.google.com by canan...@gmail.com on 4 Dec 2011 at 7:19

Attachments: