diff options
author | Julien Gouesse <[email protected]> | 2015-08-13 20:50:15 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2015-08-13 20:50:15 +0200 |
commit | 4a1a777088cfd20875d2a99a71028e37e2c9fc92 (patch) | |
tree | b5ca335dbf750bebdbfec2c942a4f46cc051c71f /src/jogl/classes/com/jogamp/opengl/util | |
parent | 23d8cbd413ac6aca737d7a7d062c8bb6f5ac1ca5 (diff) |
Adds the compute shaders into the list of supported shaders for ShaderCode
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java index e1db3f7a3..9f0a77976 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java @@ -47,6 +47,7 @@ import java.util.Set; import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GL3; +import com.jogamp.opengl.GL3ES3; import com.jogamp.opengl.GL4; import com.jogamp.opengl.GLES2; import com.jogamp.opengl.GLContext; @@ -138,6 +139,7 @@ public class ShaderCode { case GL3.GL_GEOMETRY_SHADER: case GL3.GL_TESS_CONTROL_SHADER: case GL3.GL_TESS_EVALUATION_SHADER: + case GL3ES3.GL_COMPUTE_SHADER: break; default: throw new GLException("Unknown shader type: "+type); @@ -168,6 +170,7 @@ public class ShaderCode { case GL3.GL_GEOMETRY_SHADER: case GL3.GL_TESS_CONTROL_SHADER: case GL3.GL_TESS_EVALUATION_SHADER: + case GL3ES3.GL_COMPUTE_SHADER: break; default: throw new GLException("Unknown shader type: "+type); @@ -767,6 +770,8 @@ public class ShaderCode { return "TESS_CONTROL_SHADER"; case GL3.GL_TESS_EVALUATION_SHADER: return "TESS_EVALUATION_SHADER"; + case GL3ES3.GL_COMPUTE_SHADER: + return "COMPUTE_SHADER"; } return "UNKNOWN_SHADER"; } @@ -1284,6 +1289,8 @@ public class ShaderCode { defaultPrecision = es3_default_precision_vp; break; case GL2ES2.GL_FRAGMENT_SHADER: defaultPrecision = es3_default_precision_fp; break; + case GL3ES3.GL_COMPUTE_SHADER: + defaultPrecision = es3_default_precision_fp; break; default: defaultPrecision = null; break; @@ -1308,6 +1315,8 @@ public class ShaderCode { defaultPrecision = gl3_default_precision_vp_gp; break; case GL2ES2.GL_FRAGMENT_SHADER: defaultPrecision = gl3_default_precision_fp; break; + case GL3ES3.GL_COMPUTE_SHADER: + defaultPrecision = gl3_default_precision_fp; break; default: defaultPrecision = null; break; |