Ati shader problem

hello everyone,

i’m new to jme so i made my way through the beginner tutorials. at the animation tutorial ( ) some strange things happen: this robot does not appear. i got it down to this: when i hardcode the settings an force it to use LWJGL_OPENGL1, the robot appears but the animation is not played (i assume this has something to do with the shaders). with LWJGL_OPENGL2, everything starts fine but the robot is not displayed, just the background. with LWJGL_OPENGL3, the program crashes at startup with a shader compilation error (got this message):

Implicit version number 110 not supported by GL3 forward compatible context

Its the Common/MatDefs/Light/Lighting.vert vertex shader, i dont know if this is a general problem or just this shader.

I use a HD 5970 with the latest catalyst driver (12.3) on a Windows 7 64bit system. Also, jme sdk tells me with a graphics capability check that i’m able to use OpenGl up to 3.2 and GLSL up to 1.5.

i dont have this problem on my lenovo x200 notebook with opensuse 12.1 64bit.

i hope this is enough info, if not, just ask what you need

Update your graphics driver, if it doesn’t work then (do the test classes work?) you have to go with OpenGL1 mode for your card.

Not an opengl issue, i have the exact same card and system and i had similar issue with previous drivers (are the 12.3 the last ones?).

The bad new is that I resolved it by rolling back my drivers (i think october 2011 drivers)

ok, i solved it. i read the jme-shader-tutorials and the specifications of jme-materials (there is a good pdf about that: ). in the j3md-file of the lighting-shader (later the compiler complained also about the unshaded-shader), i changed de following lines

VertexShader GLSL100: Common/MatDefs/Light/Lighting.vert

FragmentShader GLSL100: Common/MatDefs/Light/Lighting.frag


VertexShader GLSL150: Common/MatDefs/Light/Lighting.vert

FragmentShader GLSL150: Common/MatDefs/Light/Lighting.frag

same with the unshaded-shader, the other one i had errors. now the animation tutorial works fine with opengl 3.0 and the 12.3 catalyst driver (which is at the moment the latest driver). opengl 2.0 still doesnt show any robot, but with a working 3.0 i dont care about that anymore.

i hope this helps anyone with the same problems.

1 Like

oh interesting!

thanks for digging that up

ok another shader problem appeared, this time with an nvidia GTX 570 with latest drivers (machine of a friend). i hardcoded LWJGL_OPENGL3 as normal, but when he wants to run my program he gets the following shader error:

error C7555: attribute si deprecated, use in/out instead

error C7555: varying is deprecated, use in/out instead

solution is obvious, we changed all attribute’s in the used shaders with in and all varying with out. seems that the nvidia driver dont like it the old way. ati driver doesnt make any problems and works also with in/out instead of attribute/varying. can it be that the shaders are not yet GLSL 150 compatible??

ps: after these changes we got the error C7533: global variable gl_FragColor is deprecated after version 120

As mentioned elsewhere, OpenGL3 renderer won’t work without changes to the shaders. You can add additional shaders in the lighting material for example, with GLSL330, which will be loaded when that renderer is used.

But with the opengl 2 renderer you should be able to use most opengl3 stuff, (or am i wrong here)?

OpenGL is not backward compatible since version 3.0. This means that in forward compatible mode deprecated features are not available. From the error message : “Implicit version number 110 not supported by GL3 forward compatible context” it seems you created a forward compatible context.

You must create the GL context with backward compatibility profile if you have a driver 3.2 or higher I think.

This problem must be addressed in JME sooner or later because driver vendors may completely drop features even in compatibility mode…

Some OpenGL guru might give you better explanation though, and it is possible that I am totally wrong here.

Here are some readings on the topic:

OpenGL profiles and deprecation

Core And Compatibility in Contexts

1 Like

Yes jME3 can still use OpenGL features up to 4.2 even if the selected renderer is OpenGL2.

The forward compatible mode (OpenGL3 in jME3) is for the case you don’t want to rely on any “deprecated” features. jME3 supports that mode in the renderer, but most of the shaders we have are written against GLSL 1.0 - 1.5 which are not compatible with the new GLSL 3.3+ shaders.