summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java14
1 files changed, 7 insertions, 7 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 812cbcc9d..7c6a40468 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
@@ -726,7 +726,7 @@ public class ShaderCode {
return position+data.length();
}
}
- return -1;
+ return position;
}
/**
@@ -931,22 +931,22 @@ public class ShaderCode {
*/
public final int addDefaultShaderPrecision(GL2ES2 gl, int pos) {
final String defaultPrecision;
- if( gl.isGLES2() ) {
+ if( gl.isGLES3() ) {
switch ( shaderType ) {
case GL2ES2.GL_VERTEX_SHADER:
- defaultPrecision = es2_default_precision_vp; break;
+ defaultPrecision = es3_default_precision_vp; break;
case GL2ES2.GL_FRAGMENT_SHADER:
- defaultPrecision = es2_default_precision_fp; break;
+ defaultPrecision = es3_default_precision_fp; break;
default:
defaultPrecision = null;
break;
}
- } else if( gl.isGLES3() ) {
+ } else if( gl.isGLES2() ) {
switch ( shaderType ) {
case GL2ES2.GL_VERTEX_SHADER:
- defaultPrecision = es3_default_precision_vp; break;
+ defaultPrecision = es2_default_precision_vp; break;
case GL2ES2.GL_FRAGMENT_SHADER:
- defaultPrecision = es3_default_precision_fp; break;
+ defaultPrecision = es2_default_precision_fp; break;
default:
defaultPrecision = null;
break;