GL_EXT_stencil_two_side

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…

glActiveStencilFaceEXT

…with either GL_FRONT or GL_BACK.

Bye!
Mark

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.

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.

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.

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.

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).

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.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.