summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-04-02 19:25:16 +0200
committerSven Gothel <[email protected]>2014-04-02 19:25:16 +0200
commitabc833631e0ab30a06c7aff47a39a551544fd735 (patch)
tree1d6e5a94d2149d7b2635de5b5eccb330bc41cd2c /src/jogl/classes/javax/media/opengl
parente8a5a1cbb988670ca206ab1ac633e19a91bfa478 (diff)
Bug 801: Reduce temp. object creation, i.e. GC load
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLBufferStorage.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLBufferStorage.java b/src/jogl/classes/javax/media/opengl/GLBufferStorage.java
index 929ecf60a..b36e87101 100644
--- a/src/jogl/classes/javax/media/opengl/GLBufferStorage.java
+++ b/src/jogl/classes/javax/media/opengl/GLBufferStorage.java
@@ -78,10 +78,10 @@ import java.nio.IntBuffer;
*/
public abstract class GLBufferStorage {
private final int name;
- private final long size;
- private final int mutableUsage;
- private final int immutableFlags;
- protected ByteBuffer mappedBuffer;
+ private /* final */ long size;
+ private /* final */ int mutableUsage;
+ private /* final */ int immutableFlags;
+ private ByteBuffer mappedBuffer;
protected GLBufferStorage(final int name, final long size, final int mutableUsage, final int immutableFlags) {
this.name = name;
@@ -91,6 +91,16 @@ public abstract class GLBufferStorage {
this.mappedBuffer = null;
}
+ protected void reset(final long size, final int mutableUsage, final int immutableFlags) {
+ this.size = size;
+ this.mutableUsage = mutableUsage;
+ this.immutableFlags = immutableFlags;
+ this.mappedBuffer = null;
+ }
+ protected void setMappedBuffer(final ByteBuffer buffer) {
+ this.mappedBuffer = buffer;
+ }
+
/** Return the buffer name */
public final int getName() { return name; }