Created attachment 769 [details] Source file Noticed using 2.3.2. as available on http://jogamp.org/deployment/jogamp-current/archive/. The following code in a GLEventListener produces an error : public class MyGLEventListener implements GLEventListener { public void display (GLAutoDrawable drawable) { GL2ES2 gl = drawable.getGL ().getGL2ES2(); ShaderCode fs; String[][] fsCode = {{"void main (void) { gl_FragColor = vec4 (1.0, 0.0, 0.0, 1.0); }"}}; fs = new ShaderCode (GL2ES2.GL_FRAGMENT_SHADER, 1, fsCode); fs.compile (gl, System.out); } //... } The error message is : Shader status invalid: ERROR: 0:1: 'gl_FragColor' : undeclared identifier ERROR: 0:1: 'assign' : cannot convert from 'const 4-component vector of float' to 'float' But it works fine when using GL2 instead of GL2ES2 : public class MyGLEventListener implements GLEventListener { public void display (GLAutoDrawable drawable) { GL2 gl = drawable.getGL ().getGL2(); ShaderCode fs; String[][] fsCode = {{"void main (void) { gl_FragColor = vec4 (1.0, 0.0, 0.0, 1.0); }"}}; fs = new ShaderCode (GL2.GL_FRAGMENT_SHADER, 1, fsCode); fs.compile (gl, System.out); } //... } Full code attached.
Problem is not with JOGL, but with the driver which doesn't consider using GLSL 1.0 by default even if the GLSL #version directive is not used in the fragment shader code.