diff options
author | Sven Gothel <[email protected]> | 2008-08-29 08:49:29 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-08-29 08:49:29 +0000 |
commit | 4667ad39359ac0f096ad8257bc3e29740493028a (patch) | |
tree | ea6efe460ddc8c88adca1546837e4624d703640d /src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java | |
parent | c91152ffe6a86e29c4e6c896eec7af5a40bc7be0 (diff) |
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
Diffstat (limited to 'src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java')
-rw-r--r-- | src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java | 16 |
1 files changed, 5 insertions, 11 deletions
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()); } } |