GLSL gl_FrontFacing errneousley always true?

Hi,

I’m working with a fragment shader that has run fine on ATI/NVidia on Windows and with NVidia on Mac OS X, but recently discovered that with ATI on Mac OS X (10.5), the gl_FrontFacing variable is always true. I have reported this to Apple, but received no comments. Has anyone else run into this?

(I have also discovered that attempting to use edge flags with glDrawArrays(GL_TRIANGLE,… ) ATI / Mac OS X is futile…)

Cheers

I remember this being problematic on the X1600.

Have you tried using GL_VERTEX_PROGRAM_TWO_SIDE_ARB and writing to gl_FrontFacing in the vertex shader? That’s a possible work around.

Other than that file a radar with Apple, or mention it on the Apple OpenGL List as Chris and others from ATI tend to lurk there and will reply. :slight_smile:

Writing to gl_FrontFacing in the vertex shader? How would I know what to write to it?

I did check out GL_VERTEX_PROGRAM_TWO_SIDE and I figured that I could use the color to code what is front / back as a workaround.

I’ll drop a message on the OpenGL list…

Noticed your post on the list… Hopefully Chris will respond to you.

I am guessing you’ve found this and read it…
http://lists.apple.com/archives/mac-opengl/2009/Mar/msg00001.html

That was kind of what I was referring to in the post above. I meant of course to use the colours but my fingers got ahead of my brain!!. :slight_smile:

Thanks for the advice to post on mac-openl scratt! ATI are helping me out now.

I successfully implemented a workaround with secondary back and front colors for gl_FrontFacing emulation that works great. The edgeflags thing was a confirmed bug.

No worries. For all their little niggles with drivers ATI seem far more responsive and genuinely concerned about issues than any other vendor. Glad you got some help. :slight_smile:

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