GLSL on OS X

Started by fliegerhorst, August 18, 2005, 15:10:23

Previous topic - Next topic

fliegerhorst

hi there!

i just realized that with the latest graphics driver update for apple's powerbooks GLSL is now finally supported under OS X
(http://www.apple.com/support/downloads/powerbookg4graphicsupdate10.html) - i'm not sure how it is with the g5 line, but i would guess that now the later powerbooks and g5s support glsl.

i made a quick test but unfortunately there seems to be a problem with lwjgl - which is loading but completely ignoring the shaders in its rendering! another example: the glsl support demo on jmonkeyengine.com shows only a grey quad without texture.

anyone here has an idea about lwjgls progress in this area?
or is this a jme problem?

cheers,
horst

Matzon

I think its a jme issue.
Try running the shaders test in: org.lwjgl.test.opengl.shaders

fliegerhorst

ok, i tried it with ShadersTest in the lwjgl-macosx-0.98 release
both low level programs work and display a colored sphere, where the shader equivalents only show up a black window.

i tested this on a powerbook g4 w/ radeon mobility 9800 128mb / osx 10.4.2

elias

I'm curious: Have you seen _any_ GLSL program work on your setup?

- elias

fliegerhorst

prior to the above mentioned graphics driver update by apple glsl didnt work on this machine.
but of course i have checked - that after installing the update, i could successfully write and execute shaders using apples opengl shader builder tool (included in their developer tools)

-- you don't have this problem on your machine?
i have a few g5s at work and will test the same on there tomorrow.

-- please let me know if i could help you with some more information?

elias

I've never tried shaders on any machine, so I can't say if it works elsewhere. However, I know that GL2 exposes methods to get any errors from compilation of the shaders (glValidateProgram? glGetShaderInfoLog? glGetProgramInfoLog? ). Have you checked the output from them?

- elias

fliegerhorst

the strange thing is - it seems that the shaders are fully validated, if your shaders have a syntax error lwjgl exits by outputting the error. however if everything is correct - nothing happens!

(note: i havent checked these methods directly, since i'm a jme user)

elias

I tried on our G5, but I can't even get simple GLSL shaders to work in Shader Builder when rendering in hardware mode. But in software rendering, it works. It smells like a driver problem to me.

- elias

fliegerhorst

on the g5 it is a driver issue. apple didnt release any new graphic drivers for quite some time...

in fact - afaik - at the moment only the latest powerbook supports glsl - that's why i've explicitly mentioned this update.
(here shaderbuilder runs glsl shaders in NON-software mode)

what can i do to start looking for the problem?

elias

I'd dumb down the shaders to the absolute minimum, that is a "null" vertex shader, and a fragment shader that only set the color to something constant, say:

void main(void) {
    gl_FragColor.rgb = vec3(1.0, 1.0, 0.5);
    gl_FragColor.a = 1.0;
}


And see if that works.

- elias

fliegerhorst

ok, so i did.

using the minimal shader example you posted - gl shader builder renders only a white sphere.

i'm sorry to have bugged you with this false positive - it's clear now that i've mistakenly believed glsl finally works on the mac - since a minimal sampler2D shader showed up the texture correctly.

too bad - this is really a graphics driver issue. =/

in case there'll be a new driver by apple  that really supports glsl - what modifications have to be done to lwjgl or will it work out of the box?

Matzon

it should work out of the box

gregorypierce

Apple doesn't actually support GLSL at this time, only some bastard subset of GLSL which is ripe with APPL_ extensions. I've been waiting too :) Its keeping me from moving forward on my stuff because I want an entire shader based rendering path.

numberR

http://lists.apple.com/archives/mac-opengl/2005/Aug/msg00027.html
it's coming, according to the mailing list.
i just hope it  will happen soon...