Enabling Stencil test

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
mikegl
Earned a small fee
Earned a small fee
Posts: 14
Joined: Fri Jul 12, 2019 12:31 am

Enabling Stencil test

Post by mikegl » Sun Sep 01, 2019 5:58 pm

Hello, because stencil testing is not by default supported for some frameworks, I would like to ask if there is a need to do it for wxGLCanvas. I have only found that there is an attribute to set up the stencil buffer size but I didn't found anything about how (or if) to enable the stencil test.

Manolo
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 695
Joined: Mon Apr 30, 2012 11:07 pm

Re: Enabling Stencil test

Post by Manolo » Mon Sep 02, 2019 5:51 pm

What wxWidgets can do about OpenGL can be read in the FAQ of "General Development", viewtopic.php?f=27&t=45552
there is an attribute to set up the stencil buffer size
True. See the wx docs https://docs.wxwidgets.org/trunk/classw ... butes.html

Enabling/disabling the stencil buffer test is an OpenGL command: glEnable(GL_STENCIL_TEST) See https://www.khronos.org/registry/OpenGL ... able.xhtml

mikegl
Earned a small fee
Earned a small fee
Posts: 14
Joined: Fri Jul 12, 2019 12:31 am

Re: Enabling Stencil test

Post by mikegl » Mon Sep 02, 2019 8:10 pm

Thank you for the help, I have done this in OpenGL before:
Enabling/disabling the stencil buffer test is an OpenGL command: glEnable(GL_STENCIL_TEST) See https://www.khronos.org/registry/OpenGL ... able.xhtml
but I will check out the rest you have suggested.

Post Reply