summaryrefslogtreecommitdiffstats
path: root/make/gl-common.cfg
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-11-26 06:02:27 +0000
committerKenneth Russel <[email protected]>2006-11-26 06:02:27 +0000
commit3d445e164c242fb050dc6ecc8ca736731f7bcc67 (patch)
tree70b7ad77ca6090583fb6bc8a016c6b8ffaad1b40 /make/gl-common.cfg
parent643849d65648411b55281ea5c87878e148dda97b (diff)
Fixed another performance problem related to buffer objects pointed
out by John Burkey. glGetBufferParameterivARB call in glMapBuffer was too expensive at least with Apple's multithreaded OpenGL implementation. Now track both bound buffer state (refactored into GLBufferStateTracker) as well as cache created buffers' sizes (expressed in GLBufferSizeTracker) and query the cache instead of OpenGL directly. Verified with VertexBufferObject demo that now no glGet queries are made at run-time. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1003 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/gl-common.cfg')
-rw-r--r--make/gl-common.cfg10
1 files changed, 6 insertions, 4 deletions
diff --git a/make/gl-common.cfg b/make/gl-common.cfg
index 984d0f45a..137d69a83 100644
--- a/make/gl-common.cfg
+++ b/make/gl-common.cfg
@@ -262,10 +262,12 @@ ArgumentIsString glGetAttribLocationARB 1
#
JavaPrologue glBegin inBeginEndPair = true;
JavaEpilogue glEnd inBeginEndPair = false;
-JavaEpilogue glBindBuffer setBoundBufferObject({0}, {1});
-JavaEpilogue glBindBufferARB setBoundBufferObject({0}, {1});
-JavaEpilogue glPushClientAttrib clearBufferObjectState();
-JavaEpilogue glPopClientAttrib clearBufferObjectState();
+JavaEpilogue glBindBuffer bufferStateTracker.setBoundBufferObject({0}, {1});
+JavaEpilogue glBindBufferARB bufferStateTracker.setBoundBufferObject({0}, {1});
+JavaEpilogue glPushClientAttrib bufferStateTracker.clearBufferObjectState();
+JavaEpilogue glPopClientAttrib bufferStateTracker.clearBufferObjectState();
+JavaEpilogue glBufferData bufferSizeTracker.setBufferSize(bufferStateTracker, {0}, this, {1});
+JavaEpilogue glBufferDataARB bufferSizeTracker.setBufferSize(bufferStateTracker, {0}, this, {1});
BufferObjectKind UnpackPixel glBitmap
BufferObjectKind UnpackPixel glColorTable
BufferObjectKind UnpackPixel glColorSubTable