diff options
Diffstat (limited to 'src/classes/com/sun')
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLFixedArrayHandler.java | 4 | ||||
-rw-r--r-- | src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java | 16 |
2 files changed, 7 insertions, 13 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLFixedArrayHandler.java b/src/classes/com/sun/opengl/impl/GLFixedArrayHandler.java index 9882beb69..333a75aa0 100644 --- a/src/classes/com/sun/opengl/impl/GLFixedArrayHandler.java +++ b/src/classes/com/sun/opengl/impl/GLFixedArrayHandler.java @@ -6,9 +6,9 @@ import javax.media.opengl.glsl.ShaderState; import java.nio.*; public class GLFixedArrayHandler implements GLArrayHandler { - private GLArrayData ad; + private GLArrayDataEditable ad; - public GLFixedArrayHandler(GLArrayData ad) { + public GLFixedArrayHandler(GLArrayDataEditable ad) { this.ad = ad; } diff --git a/src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java b/src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java index 2910e67bd..3d48f2014 100644 --- a/src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java +++ b/src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java @@ -8,16 +8,14 @@ import javax.media.opengl.glsl.ShaderState; import java.nio.*; public class GLSLArrayHandler implements GLArrayHandler { - private GLArrayData ad; + private GLArrayDataEditable ad; - public GLSLArrayHandler(GLArrayData ad) { + public GLSLArrayHandler(GLArrayDataEditable ad) { this.ad = ad; } protected final void passVertexAttribPointer(GL2ES2 gl, ShaderState st) { - if ( ! st.glVertexAttribPointer(gl, ad) ) { - throw new RuntimeException("Internal Error"); - } + st.glVertexAttribPointer(gl, ad); } public void enableBuffer(GL gl, boolean enable) { @@ -28,9 +26,7 @@ public class GLSLArrayHandler implements GLArrayHandler { } if(enable) { - if(!st.glEnableVertexAttribArray(glsl, ad.getName())) { - throw new RuntimeException("Internal Error"); - } + st.glEnableVertexAttribArray(glsl, ad.getName()); Buffer buffer = ad.getBuffer(); @@ -53,9 +49,7 @@ public class GLSLArrayHandler implements GLArrayHandler { if(ad.isVBO()) { gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0); } - if(!st.glDisableVertexAttribArray(glsl, ad.getName())) { - throw new RuntimeException("Internal Error"); - } + st.glDisableVertexAttribArray(glsl, ad.getName()); } } |