aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/glsl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-22 06:03:44 +0200
committerSven Gothel <[email protected]>2011-04-22 06:03:44 +0200
commitbf8a54b502f0fcd930e12a8bbda65f9538e8a2f7 (patch)
tree88ebdb21601f576674ca69fee8aaf5e6847b5fd7 /src/jogl/classes/jogamp/opengl/util/glsl
parentd72745fa32a86a3820e5220643a01153e3f21fe7 (diff)
GLArrayData API and impl. changes
+++ Remove GL parameter for - createFixed(..) - createGLSL(..) validation at client/server array data happens at 1st enableBuffer() call, no current context or profile required at creation time. Added ShaderState for createGLSL(..) clarifying dependency to the ShaderState, passing it down to the GLSLArrayHandler, which also removes the TLS GLContext.getCurrent() call. +++ Partially reverted ab48dac3f4419ceac51fdf059f310f0f0499c4d7 factory methods: removed added vboTarget parameter, since all createFixed and createGLSL are GL_ARRAY_BUFFER (VBO). Adding createData(..) factory method in GLArrayDataServer allowing diff vbo targets, ie GL_ELEMENT_ARRAY_BUFFER .. or none.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/glsl')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java
index d0f8543a3..854d01fa6 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java
@@ -214,15 +214,15 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
}
public void glVertexPointer(int size, int type, int stride, java.nio.Buffer pointer) {
- glVertexPointer(GLArrayDataWrapper.createFixed(gl, GL_VERTEX_ARRAY, size, type, false, stride, pointer, -1, -1, -1, -1));
+ glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, false, stride, pointer, -1, -1, -1));
}
public void glVertexPointer(int size, int type, int stride, long pointer_buffer_offset) {
int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
if(vboName==0) {
throw new GLException("no GL_ARRAY_BUFFER VBO bound");
}
- glVertexPointer(GLArrayDataWrapper.createFixed(gl, GL_VERTEX_ARRAY, size, type, false,
- stride, null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
+ glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, false, stride,
+ null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW));
}
public void glColorPointer(GLArrayData array) {
@@ -241,16 +241,16 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
fixedFunction.glColorPointer(gl, array);
}
public void glColorPointer(int size, int type, int stride, java.nio.Buffer pointer) {
- glColorPointer(GLArrayDataWrapper.createFixed(gl, GL_COLOR_ARRAY, size, type, false,
- stride, pointer, -1, -1, -1, -1));
+ glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, false, stride,
+ pointer, -1, -1, -1));
}
public void glColorPointer(int size, int type, int stride, long pointer_buffer_offset) {
int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
if(vboName==0) {
throw new GLException("no GL_ARRAY_BUFFER VBO bound");
}
- glColorPointer(GLArrayDataWrapper.createFixed(gl, GL_COLOR_ARRAY, size, type, false,
- stride, null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
+ glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, false, stride,
+ null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW));
}
public void glNormalPointer(GLArrayData array) {
@@ -272,16 +272,16 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
fixedFunction.glNormalPointer(gl, array);
}
public void glNormalPointer(int type, int stride, java.nio.Buffer pointer) {
- glNormalPointer(GLArrayDataWrapper.createFixed(gl, GL_NORMAL_ARRAY, 3, type, false,
- stride, pointer, -1, -1, -1, -1));
+ glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, false, stride,
+ pointer, -1, -1, -1));
}
public void glNormalPointer(int type, int stride, long pointer_buffer_offset) {
int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
if(vboName==0) {
throw new GLException("no GL_ARRAY_BUFFER VBO bound");
}
- glNormalPointer(GLArrayDataWrapper.createFixed(gl, GL_NORMAL_ARRAY, 3, type, false,
- stride, null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
+ glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, false, stride,
+ null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW));
}
public void glTexCoordPointer(GLArrayData array) {
@@ -301,7 +301,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
}
public void glTexCoordPointer(int size, int type, int stride, java.nio.Buffer pointer) {
glTexCoordPointer(
- GLArrayDataWrapper.createFixed(gl, GL_TEXTURE_COORD_ARRAY, size, type, false, stride, pointer, -1, -1, -1, -1));
+ GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, false, stride, pointer, -1, -1, -1));
}
public void glTexCoordPointer(int size, int type, int stride, long pointer_buffer_offset) {
int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
@@ -309,8 +309,8 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
throw new GLException("no GL_ARRAY_BUFFER VBO bound");
}
glTexCoordPointer(
- GLArrayDataWrapper.createFixed(gl, GL_TEXTURE_COORD_ARRAY, size, type, false,
- stride, null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER) );
+ GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, false, stride,
+ null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW) );
}
public final String toString() {