diff options
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java | 5 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java index 012b1d1dd..31ad974d0 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java @@ -36,6 +36,7 @@ import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.curve.opengl.RenderState; +import com.jogamp.opengl.GLExtensions; import com.jogamp.opengl.util.glsl.ShaderCode; import com.jogamp.opengl.util.glsl.ShaderProgram; import com.jogamp.opengl.util.glsl.ShaderState; @@ -57,8 +58,8 @@ public class RegionRendererImpl01 extends RegionRenderer { rsVp.defaultShaderCustomization(gl, true, true); // rsFp.defaultShaderCustomization(gl, true, true); int pos = rsFp.addGLSLVersion(gl); - if( gl.isGLES2() ) { - pos = rsFp.insertShaderSource(0, pos, ShaderCode.extOESDerivativesEnable); + if( gl.isGLES() ) { + pos = rsFp.insertShaderSource(0, pos, ShaderCode.createExtensionDirective(GLExtensions.OES_standard_derivatives, ShaderCode.ENABLE)); } final String rsFpDefPrecision = getFragmentShaderPrecision(gl); if( null != rsFpDefPrecision ) { diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java index 60758b90b..4ec4d1d98 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java @@ -36,6 +36,7 @@ import jogamp.graph.curve.text.GlyphString; import com.jogamp.graph.curve.opengl.RenderState; import com.jogamp.graph.curve.opengl.TextRenderer; import com.jogamp.graph.font.Font; +import com.jogamp.opengl.GLExtensions; import com.jogamp.opengl.util.glsl.ShaderCode; import com.jogamp.opengl.util.glsl.ShaderProgram; import com.jogamp.opengl.util.glsl.ShaderState; @@ -56,8 +57,8 @@ public class TextRendererImpl01 extends TextRenderer { rsVp.defaultShaderCustomization(gl, true, true); // rsFp.defaultShaderCustomization(gl, true, true); int pos = rsFp.addGLSLVersion(gl); - if( gl.isGLES2() ) { - pos = rsFp.insertShaderSource(0, pos, ShaderCode.extOESDerivativesEnable); + if( gl.isGLES() ) { + pos = rsFp.insertShaderSource(0, pos, ShaderCode.createExtensionDirective(GLExtensions.OES_standard_derivatives, ShaderCode.ENABLE)); } final String rsFpDefPrecision = getFragmentShaderPrecision(gl); if( null != rsFpDefPrecision ) { |