From 4667ad39359ac0f096ad8257bc3e29740493028a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 29 Aug 2008 08:49:29 +0000 Subject: BufferUtil: - new GL type tools - new put methods ImmModeSink: - using 1 VBO array for 1-4 attributes GLArrayData - split into GLArrayData and GLArrayDataEditable, the latter of modifying purposes only - GLArrayDataWrapper implements a container only git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1764 232f8b59-042b-4e1e-8c03-345bb8c30851 --- .../com/sun/opengl/impl/glsl/GLSLArrayHandler.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java') 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()); } } -- cgit v1.2.3