View Full Version : GL_EXT_stencil_two_side

04-14-2006, 07:10 PM
Has anyone one got this working on an Intel iMac? Or any Mac?

I get a big old nasty crash as soon as I try to execute...


...with either GL_FRONT or GL_BACK.


04-15-2006, 03:44 AM
EXT_stencil_two_side doesn't appear to be supported on the Mac. You should always check for the presence of an extension before calling functions it defines.

04-15-2006, 11:16 AM
EXT_stencil_two_side is supported on NV3x+ systems, and the GMA950.

It is not currently supported on ATI renderers. You can get similar functionality on ATI renderers (R300+) using ATI_separate_stencil.

04-17-2006, 08:58 PM
Egads, your both right!

Oddly, the 'OpenGL Extensions Viewer' app I am/was using *does* list it as present - glGetString does not.

I Will no longer trust ANYONE except glGetString!

I did get ATI_separate_stencil going in the process which works just fine.

04-17-2006, 10:59 PM
The two functions do basically the same thing. There really isn't any reason that all renderers couldn't support both extensions.

You should probably file a radar, at least requesting that EXT_stencil_two_side be exported on ATI systems.

05-05-2006, 02:43 PM
OpenGL Extensions Viewer report 'GL_ATI_separate_stencil' as an alias of EXT_stencil_two_side in the OpenGL 2.0 core features set list which is the different implementation, but producing the exact same results. It doesn't report in the Extensions List page however. So this program is correct.

You need to support GL_ATI_separate_stencil AND GL_EXT_stencil_two_side if you plan to support video cards that doesn't support OpenGL 2.0. In fact, you should also support the case when none of theses extensions are supported.

If you only want to support OpenGL 2.0, use the Core functions from OpenGL 2.0, which is similar to GL_EXT_stencil_two_side (same functions name, but without the 'EXT' at the end).

That means, 4 implementations to be written (GL_ATI, GL_EXT, GL Core 2.0 and none of extensions - using two passes).

05-08-2006, 05:50 PM
So this program is correct.
Except that the ATI extension doesn't support separate stencil mask values...

Besides, even if the extensions were 100% compatible, I'd still consider the great big green tick next to 'GL_EXT_stencil_two_side' in the extensions viewer to be, at best, misleading!

That means, 4 implementations to be written (GL_ATI, GL_EXT, GL Core 2.0 and none of extensions - using two passes).
Urgh, yes...GL is fun for messing with, but a bit of a hassle for publishing.