summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-31 11:22:09 +0100
committerSven Gothel <[email protected]>2012-10-31 11:22:09 +0100
commit55f4405dbf9253e6ca686e44c50b2cfc1af7f3eb (patch)
tree3637d602debd7c4dee917a69376c0eaaf6523be2 /src/jogl/classes/jogamp/graph/curve/opengl
parentb62e1d027c289877686d6008ea8dd40e4e1541ec (diff)
ShaderProgram: Program name is valid if non zero; Add init(GL) return value for success.
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl')
-rwxr-xr-xsrc/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java4
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
index c34d1cbeb..2884aca2f 100755
--- a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
@@ -65,7 +65,9 @@ public class RegionRendererImpl01 extends RegionRenderer {
sp.add(rsVp);
sp.add(rsFp);
- sp.init(gl);
+ if( !sp.init(gl) ) {
+ throw new GLException("RegionRenderer: Couldn't init program: "+sp);
+ }
st.attachShaderProgram(gl, sp, false);
st.bindAttribLocation(gl, AttributeNames.VERTEX_ATTR_IDX, AttributeNames.VERTEX_ATTR_NAME);
st.bindAttribLocation(gl, AttributeNames.TEXCOORD_ATTR_IDX, AttributeNames.TEXCOORD_ATTR_NAME);
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java
index 158f0240a..0cf424cd2 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java
@@ -58,7 +58,9 @@ public class TextRendererImpl01 extends TextRenderer {
sp.add(rsVp);
sp.add(rsFp);
- sp.init(gl);
+ if( !sp.init(gl) ) {
+ throw new GLException("RegionRenderer: Couldn't init program: "+sp);
+ }
st.attachShaderProgram(gl, sp, false);
st.bindAttribLocation(gl, AttributeNames.VERTEX_ATTR_IDX, AttributeNames.VERTEX_ATTR_NAME);
st.bindAttribLocation(gl, AttributeNames.TEXCOORD_ATTR_IDX, AttributeNames.TEXCOORD_ATTR_NAME);