GLSL in OS X?

Does anyone know if support for GL_ARB_shader_object is planned for OS X any time soon? Where is the best place to find a roadmap of when Apple plans to support various extensions?

ARB_shader_objects is supported, as is ARB_vertex_shader and ARB_fragment_shader. Unfortunately, they’re not all that useful without ARB_shading_language_100 :slight_smile:

There is no roadmap. This is Apple. The best you’ll ever get is a hint dropped on the mac-opengl mailing list by an Apple employee. In the particular case of GLSL, we’ve been told “it’s a high priority for Apple”.

“Boo hoo,” cries Clay…

Well, using GLEW, it looks like all of the extensions are already available on OS X 10.3.5. I can even load, compile, and link vertex and shader programs. I can even find and set the values for my uniform variables. It’s so exciting!

But alas, once I call glUseProgramObjectARB(), it finally crashes inexplicably. Sigh … they all said I was crazy when I decided to support OS X as a platform … :slight_smile:

So is it currently the official stance of Apple that OGLSL is definitely not yet supported? I mean, how would we know even once it is officially supposed to work? When I download 10.3.6 it’s probably not going to tell me about something so specific. How in the world are we supposed to know what works and what doesn’t in the current version of OS X? Do we have to call OpenGL extensions and test to see if they crash, and if they crash we simply say to ourselves “OK, that’s not supported by Apple yet?” Then why is it even exposed by the video driver, for Heaven’s sake?

Is there a place to find a comprehensive list of supported extensions? It’s certainly not the OpenGL extensions guide at developer.apple.com, because that guide does NOT even list VBO even though VBO does, in fact, seem to work properly right now in 10.3.5 (once you make your own headers for it or use GLEW to find the extension, etc.)

For heck’s sake, they are sure making Microsoft Windows look friendly to developers, which is no easy task.

GL_ARB_shading_language_100 is present in the GL framework (try “strings /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLEngine.bundle/GLEngine”) but it is not exported by any renderers as of 10.3.5.

So, you can’t use it. If it is present in the framework but not exported, that means it isn’t ready yet. You must check the GL version and/or extension string to know if a feature is available. See this technote .

You should send feedback to Apple or log a bug about them updating their extensions page (and the “OpenGL Changes in 10.3.x” documents.)

In the meanwhile I’ve compiled a listing of renderer data which may be useful.

And FWIW, glewinfo 1.2.1 on my Radeon9600 under 10.3.5 correctly reports

GL_ARB_shading_language_100: MISSING

so I’m not sure how you interpret that as “it looks like all of the extensions are already available on OS X 10.3.5”?

Yes also I’ve have on my Geforce 4MX :
GL_ARB_vertex_shader, GL_ARB_fragment_shader, GL_ARB_vertex_buffer_object are defined.

I really wonder how GL_ARB_fragment_shader can be defined. Even GL_ARB_fragment_program requires a Geforce FX.

I guess the extensions are just here exposed, but there is nothing behind.

As has been said, these extensions say nothing of the language accepted. ARB_shading_language_100 is the extension that guarantees that GLSL is accepted.

My guess is that eventually ARB_shading_language_100 will be supported on all cards, with software fallback (since software fallback is required anyway, for programs that can’t be supported by the hardware).

Sorry, arekkusu, I should have said “it looks like all of the functions are already available on OS X.”

I definitely take your point about the extension string, so I will rely on that to test for availability. I had gotten away from that because, for example with NVidia on Windows, GLSL was available in a couple of their driver releases even though it didn’t appear in the vendor extensions string.

Thanks again for taking the time to set it straight.

It looks like on Tiger (10.4), Core Image is doing some shader operations but GLInfo still does not list GL_ARB_shading_language_100. Nvidia’s Cg works as it did on 10.3.5 but still no profiles more advanced than arbvp1 work on ATI, so I get really silly capacity errors (“more than 64 operations not supported”). I’m hoping GLSL will fix this…

Actually, the only thing to do right now, is to provide an assembler version of your shaders.

It would be interesting to have a GLSL to ARB vertex/fragment assembler tool, in that way you will be able to convert your high level shaders source to assembler at runtime, or at least converts GLSL code into ARB, a bit what DirectX 9 is doing with HLSL.

Apparently Tiger’s Core Image has some sort of quasi-proprietary GLSL JIT that compiles CIKernel code (“a derivative of the OpenGL Shading Language optimized for image processing” – http://developer.apple.com/macosx/tiger/)) to ARB_fragment_program (assembly) instructions. There is no native support yet in the video drivers for GLSL, but we can probably assume that this is coming in the future.

Obviously this does nothing for vertex programs but we can see that the current version of Core Image is “GLSL fragment program-ready”.

Apparently still no GL_ARB_shading_language_100 in OS 10.3.6.
Just a new extensions on my machine : GL_ARB_texture_env_crossbar (which is a 1.4 OpenGL extension).
They fixed the texture compression enumeration (which was buggy), and the vertex program invariant.

Since the 10.3.6 is probably the last version before Tiger, I guess GLSL will be in Tiger not before.

Arf, still have to convert all my GLSL program to assembler (what a joy, actually I convert the GLSL to HLSL then back to PS20 then convert back to ARB assembler …)

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