aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java44
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java8
2 files changed, 26 insertions, 26 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java b/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
index c7e27da2a..1e5dc6069 100644
--- a/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
+++ b/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
@@ -40,8 +40,6 @@
package jogamp.opengl;
-import java.util.HashMap;
-
import javax.media.opengl.*;
import com.jogamp.common.util.IntIntHashMap;
@@ -100,14 +98,15 @@ public class GLBufferStateTracker {
setBoundBufferObject(GL2.GL_PIXEL_UNPACK_BUFFER, 0);
}
- public final void setBoundBufferObject(int target, int buffer) {
- bindingMap.put(target, buffer);
- if (DEBUG) {
- System.err.println();
- System.err.println("GLBufferStateTracker.setBoundBufferObject(): mapped bound buffer 0x" +
- Integer.toHexString(buffer) + " for query target 0x" + Integer.toHexString(target));
- Thread.dumpStack();
- }
+ public final void setBoundBufferObject(int target, int value) {
+ bindingMap.put(target, value);
+ if (DEBUG) {
+ System.err.println();
+ System.err.println("GLBufferStateTracker.setBoundBufferObject() target 0x" +
+ Integer.toHexString(target) + " -> mapped bound buffer 0x" +
+ Integer.toHexString(value));
+ // Thread.dumpStack();
+ }
}
/** Note: returns an unspecified value if the binding for the
@@ -131,23 +130,24 @@ public class GLBufferStateTracker {
}
if (gotQueryTarget) {
caller.glGetIntegerv(queryTarget, bufTmp, 0);
+ value = bufTmp[0];
if (DEBUG) {
System.err.println();
- System.err.println("GLBufferStateTracker.getBoundBufferObject(): queried bound buffer 0x" +
- Integer.toHexString(bufTmp[0]) +
- " for target 0x" + Integer.toHexString(target)+" / query 0x"+Integer.toHexString(queryTarget));
+ System.err.println("GLBufferStateTracker.getBoundBufferObject() [queried value]: target 0x" +
+ Integer.toHexString(target) + " / query 0x"+Integer.toHexString(queryTarget)+
+ " -> mapped bound buffer 0x" + Integer.toHexString(value));
}
- setBoundBufferObject(target, bufTmp[0]);
- return bufTmp[0];
+ setBoundBufferObject(target, value);
+ return value;
}
return 0;
}
- if (DEBUG) {
- System.err.println();
- System.err.println("GLBufferStateTracker.getBoundBufferObject(): mapped bound buffer 0x" +
- Integer.toHexString(value) + " for query target 0x" + Integer.toHexString(target));
- Thread.dumpStack();
- }
+ if (DEBUG) {
+ System.err.println();
+ System.err.println("GLBufferStateTracker.getBoundBufferObject() [mapped value]: target 0x" +
+ Integer.toHexString(target) + " -> mapped bound buffer 0x" +
+ Integer.toHexString(value));
+ }
return value;
}
@@ -163,7 +163,7 @@ public class GLBufferStateTracker {
if (DEBUG) {
System.err.println();
System.err.println("GLBufferStateTracker.clearBufferObjectState()");
- Thread.dumpStack();
+ //Thread.dumpStack();
}
}
}
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 854d01fa6..984439031 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java
@@ -214,7 +214,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
}
public void glVertexPointer(int size, int type, int stride, java.nio.Buffer pointer) {
- glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, false, stride, pointer, -1, -1, -1));
+ glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, false, stride, pointer, 0, 0, 0));
}
public void glVertexPointer(int size, int type, int stride, long pointer_buffer_offset) {
int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
@@ -242,7 +242,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
}
public void glColorPointer(int size, int type, int stride, java.nio.Buffer pointer) {
glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, false, stride,
- pointer, -1, -1, -1));
+ pointer, 0, 0, 0));
}
public void glColorPointer(int size, int type, int stride, long pointer_buffer_offset) {
int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
@@ -273,7 +273,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
}
public void glNormalPointer(int type, int stride, java.nio.Buffer pointer) {
glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, false, stride,
- pointer, -1, -1, -1));
+ pointer, 0, 0, 0));
}
public void glNormalPointer(int type, int stride, long pointer_buffer_offset) {
int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
@@ -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_TEXTURE_COORD_ARRAY, size, type, false, stride, pointer, -1, -1, -1));
+ GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, false, stride, pointer, 0, 0, 0));
}
public void glTexCoordPointer(int size, int type, int stride, long pointer_buffer_offset) {
int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);