diff options
author | Sven Gothel <[email protected]> | 2013-10-29 13:51:32 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-29 13:51:32 +0100 |
commit | 9f2a9df0a4b7093925c8854b37fba053469a4b35 (patch) | |
tree | 838148c91d619f99e70e26f4d8ba958e41f7fbb5 /src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java | |
parent | d8074fb1df1bdb63fdb97585c797c15d34695e9c (diff) |
Bug 776 GLContext Sharing: Add copy-ctor to GLArrayData* w/ sliced Buffer; Refine GearsObject* GLArrayDataServer copying; GearsES*: Init VBO eagerly
Add copy-ctor to GLArrayData* w/ sliced Buffer to allow general sharing of VBO via these high-level types.
Refine GearsObject* GLArrayDataServer copying (commit bcfaa149b9803ce33c5a356cbcb45f7dfd3e4361):
Utilize new GLArrayData* copy-ctor.
GearsES*: Init VBO eagerly, allowing VBO usage after init(..).
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java index f480c4bde..e281b14fd 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java @@ -444,6 +444,28 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData protected GLArrayDataClient() { } + /** + * Copy Constructor + * <p> + * Buffer is {@link Buffers#slice(Buffer) sliced}, i.e. sharing content but using own state. + * </p> + * <p> + * All other values are simply copied. + * </p> + */ + public GLArrayDataClient(GLArrayDataClient src) { + super(src); + this.isValidated = src.isValidated; + this.sealed = src.sealed; + this.bufferEnabled = src.bufferEnabled; + this.bufferWritten = src.bufferWritten; + this.enableBufferAlways = src.enableBufferAlways; + this.initialElementCount = src.initialElementCount; + this.glArrayHandler = src.glArrayHandler; + this.usesGLSL = src.usesGLSL; + this.shaderState = src.shaderState; + } + protected boolean sealed; protected boolean bufferEnabled; protected boolean bufferWritten; |