From 4d493ac36bd5d763d2af3243e799bbaef3679594 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 17 Oct 2009 13:44:12 -0700 Subject: 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 --- .../classes/com/sun/opengl/impl/GLBufferStateTracker.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/jogl/classes/com/sun/opengl/impl/GLBufferStateTracker.java') 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.

* @@ -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 -- cgit v1.2.3