From 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 14 Jan 2014 07:37:26 +0100 Subject: Bug 942 - Share GLBufferStateTracker ; Unify GLBufferStateTracker and GLBufferSizeTracker (simplification) Due to future mapped buffer tracking, the GLBufferStateTracker instance shall be shared across shared GLContextImpl instances similar to GLSizeStateTracker! This allows us to merge GLSizeStateTracker code into GLBufferStateTracker to simplify the implementation. +++ Clear the GLBufferStateTracker (@destruction) only if no more created shares are left! +++ --- make/config/jogl/gl-impl-CustomJavaCode-common.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'make/config/jogl/gl-impl-CustomJavaCode-common.java') diff --git a/make/config/jogl/gl-impl-CustomJavaCode-common.java b/make/config/jogl/gl-impl-CustomJavaCode-common.java index b8da61065..3aeda1309 100644 --- a/make/config/jogl/gl-impl-CustomJavaCode-common.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-common.java @@ -11,7 +11,7 @@ @Override public final long glGetBufferSize(int buffer) { - return bufferSizeTracker.getDirectStateBufferSize(buffer, this); + return bufferStateTracker.getDirectStateBufferSize(buffer, this); } @Override @@ -135,7 +135,7 @@ if (glProcAddress == 0) { throw new GLException("Method \""+(useRange?"glMapBufferRange":"glMapBuffer")+"\" not available"); } - final long sz = bufferSizeTracker.getBufferSize(bufferStateTracker, target, this); + final long sz = bufferStateTracker.getBufferSize(target, this); if (0 == sz) { return null; } @@ -188,7 +188,7 @@ if (glProcAddress == 0) { throw new GLException("Method \"glMapNamedBufferEXT\" not available"); } - final long sz = bufferSizeTracker.getDirectStateBufferSize(bufferName, this); + final long sz = bufferStateTracker.getDirectStateBufferSize(bufferName, this); if (0 == sz) { return null; } -- cgit v1.2.3