aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-08-29 08:49:29 +0000
committerSven Gothel <[email protected]>2008-08-29 08:49:29 +0000
commit4667ad39359ac0f096ad8257bc3e29740493028a (patch)
treeea6efe460ddc8c88adca1546837e4624d703640d /src/classes/com/sun/opengl/impl
parentc91152ffe6a86e29c4e6c896eec7af5a40bc7be0 (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')
-rw-r--r--src/classes/com/sun/opengl/impl/GLFixedArrayHandler.java4
-rw-r--r--src/classes/com/sun/opengl/impl/glsl/GLSLArrayHandler.java16
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());
}
}