aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLContextShareSet.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-14 20:25:07 +0100
committerSven Gothel <[email protected]>2014-01-14 20:25:07 +0100
commit30bd30d6563041b71f40e4c336e636768ae26f9d (patch)
tree8d901da17b32e503269bc2892847d2ca5358d84e /src/jogl/classes/jogamp/opengl/GLContextShareSet.java
parentf8a74c9831c65725a699320c27e62161a0378241 (diff)
Bug 942: Bug 942 - Review GLBuffer[State|Size]Tracker and NIO mapped buffers
Commit f8a74c9831c65725a699320c27e62161a0378241 reverted commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1 due to the fact that the buffer binding itself is _not_ shared across shared GLContext! Apply uncritical changes of 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1: +++ Simplify GLBufferSizeTracker creation @ GLContextImpl ctor, make it final. +++ Clear the GLBufferSizeTracker (@destruction) only if no more created shares are left! +++ Refine API doc. +++
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextShareSet.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextShareSet.java24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextShareSet.java b/src/jogl/classes/jogamp/opengl/GLContextShareSet.java
index 483767b44..c057c904c 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextShareSet.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextShareSet.java
@@ -262,30 +262,6 @@ public class GLContextShareSet {
return false;
}
- /** In order to avoid glGet calls for buffer object checks related
- to glVertexPointer, etc. calls as well as glMapBuffer calls, we
- need to share the same GLBufferSizeTracker object between
- contexts sharing textures and display lists. For now we keep
- this mechanism orthogonal to the GLObjectTracker to hopefully
- keep things easier to understand. (The GLObjectTracker is
- currently only needed in a fairly esoteric case, when the
- Java2D/JOGL bridge is active, but the GLBufferSizeTracker
- mechanism is now always required.) */
- public static void synchronizeBufferObjectSharing(final GLContext olderContextOrNull, final GLContext newContext) {
- final GLContextImpl older = (GLContextImpl) olderContextOrNull;
- final GLContextImpl newer = (GLContextImpl) newContext;
- GLBufferSizeTracker tracker = null;
- if (older != null) {
- tracker = older.getBufferSizeTracker();
- assert (tracker != null)
- : "registerForBufferObjectSharing was not called properly for the older context, or has a bug in it";
- }
- if (tracker == null) {
- tracker = new GLBufferSizeTracker();
- }
- newer.setBufferSizeTracker(tracker);
- }
-
//----------------------------------------------------------------------
// Internals only below this point