From 55f4405dbf9253e6ca686e44c50b2cfc1af7f3eb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 31 Oct 2012 11:22:09 +0100 Subject: ShaderProgram: Program name is valid if non zero; Add init(GL) return value for success. --- src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java | 4 +++- src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/jogamp/graph') 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); -- cgit v1.2.3