diff options
author | Sven Gothel <[email protected]> | 2009-10-17 13:44:12 -0700 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-10-17 13:44:12 -0700 |
commit | 4d493ac36bd5d763d2af3243e799bbaef3679594 (patch) | |
tree | 3017bab34a8824f706e3ba63f835aaffd3317222 /src/jogl/classes/com/sun/opengl/impl/GLBufferStateTracker.java | |
parent | 5ae314adc19c660f26f32839b2cc224cdccfbb59 (diff) |
All tracker are aggregated in the GLContext now
and used within the GL*Impl.
New GLStateTracker:
- Tracking client/server states
- Currently supports PixelStorei
- Prologued in glPixelStorei and glGetIntegerv,
the latter will return the tracked state if available
and not call the GL method.
Impacts performance and ES1 compatibility (supports ALIGNMENT).
Fixed 'imageSizeInBytes' calculation:
- skipPixels and skipRows is a static one time offset
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/GLBufferStateTracker.java')
-rwxr-xr-x | src/jogl/classes/com/sun/opengl/impl/GLBufferStateTracker.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLBufferStateTracker.java b/src/jogl/classes/com/sun/opengl/impl/GLBufferStateTracker.java index ddc82eba2..c61d3602d 100755 --- a/src/jogl/classes/com/sun/opengl/impl/GLBufferStateTracker.java +++ b/src/jogl/classes/com/sun/opengl/impl/GLBufferStateTracker.java @@ -45,10 +45,8 @@ import javax.media.opengl.*; /** * Tracks as closely as possible which OpenGL buffer object is bound * to which binding target in the current OpenGL context. - * GLBufferStateTracker objects are allocated on a per-GLImpl basis, - * which is basically identical to a per-OpenGL-context basis - * (assuming correct usage of the GLImpl objects, which is checked by - * the DebugGL). This class is used to verify that e.g. the vertex + * GLBufferStateTracker objects are allocated on a per-OpenGL-context basis. + * This class is used to verify that e.g. the vertex * buffer object extension is in use when the glVertexPointer variant * taking a long as argument is called. <P> * @@ -101,8 +99,7 @@ public class GLBufferStateTracker { } public void setBoundBufferObject(int target, int buffer) { - Integer key = box(target); - bindingMap.put(key, box(buffer)); + bindingMap.put(box(target), box(buffer)); } /** Note: returns an unspecified value if the binding for the @@ -110,8 +107,7 @@ public class GLBufferStateTracker { You must use isBoundBufferObjectKnown() to see whether the return value is valid. */ public int getBoundBufferObject(int target, GL caller) { - Integer key = box(target); - Integer value = (Integer) bindingMap.get(key); + Integer value = (Integer) bindingMap.get(box(target)); if (value == null) { // User probably either called glPushClientAttrib / // glPopClientAttrib or is querying an unknown target. See |