Modification needed...?


I think a modification is needed in "com.jme.scene.state.lwjgl.LWJGLShaderObjectsState".

The function "isSupported()", who have to test if shading language is supported by hardware,

only one capability is tested : "GL_ARB_shader_objects", but, on some 3D cards, this capability

is supported but not the "GL_ARB_fragment_shader" (like my GeForce 4 TI4400 128Mo).

So, when I launch my program, it test if shaders are supported and it return true, so the

"lightning per pixel" mode is enabled, but don't work.

Today, the function "isSupported()" is like that :

 public boolean isSupported() {
        return GLContext.getCapabilities().GL_ARB_shader_objects

And this version of "isSupported()" resolve my problem :

public boolean isSupported() {
        return GLContext.getCapabilities().GL_ARB_shader_objects &&
           GLContext.getCapabilities().GL_ARB_fragment_shader &&
           GLContext.getCapabilities().GL_ARB_vertex_shader &&

Could you tell me what did you think about this proposition?

many thanks


sounds very good. i think i'll add this tonight to cvs…

Thanks ! It helps me too  :smiley:

now in CVS…

Thanks for this very quick reaction!

now i get "Your graphics card does not support vertex or fragment programs, and thus cannot run this test." when running TestFragmentProgramState.

this sucks a bit, as the test ran previously correctly before on my geforce 4 ti 4200.

appearantly not, since vetex and fragmentprogramstate are untouched(the states used in testfragmentprogramstate). this change was only to glslshaderobjectstate and does not affect that.