aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/gl-if-CustomJavaCode-gl4.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-11 17:58:52 +0100
committerSven Gothel <[email protected]>2015-03-11 17:58:52 +0100
commita622ffbced14e1e2fe797c82fc62c431ffb6949f (patch)
tree611873d7f6dd3fc53a449fb18631092be20e606e /make/config/jogl/gl-if-CustomJavaCode-gl4.java
parent68391b118e93170c568edc21edad7f6b0c1f97a3 (diff)
Bug 1135: GLBufferObjectTracker for GL 4.5: Separate GL 4.5 DSA and GL_EXT_direct_state_access
We cannot subsume/rename even parts of GL_EXT_direct_state_access, since it is explcit stated in the spec that no assumption shall be made in regards compatibility and interaction. Hence we add both, GL 4.5 DSA and GL_EXT_direct_state_access.
Diffstat (limited to 'make/config/jogl/gl-if-CustomJavaCode-gl4.java')
-rw-r--r--make/config/jogl/gl-if-CustomJavaCode-gl4.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/make/config/jogl/gl-if-CustomJavaCode-gl4.java b/make/config/jogl/gl-if-CustomJavaCode-gl4.java
new file mode 100644
index 000000000..8ed25e56b
--- /dev/null
+++ b/make/config/jogl/gl-if-CustomJavaCode-gl4.java
@@ -0,0 +1,46 @@
+
+ //
+ // GLBufferObjectTracker Redirects
+ //
+
+ /**
+ * Returns the {@link GLBufferStorage} instance as mapped via OpenGL's native {@link GL4#glMapNamedBuffer(int, int) glMapNamedBuffer(..)} implementation.
+ * <p>
+ * Throws a {@link GLException} if GL-function constraints are not met.
+ * </p>
+ * <p>
+ * Depends on <code>GL_VERSION_4_5</code>.
+ * </p>
+ * <p>
+ * {@link GL4#glMapNamedBuffer(int, int)} wrapper calls this method and returns {@link GLBufferStorage#getMappedBuffer()}.
+ * </p>
+ * @param bufferName denotes the buffer
+ * @param access the mapping access mode
+ * @throws GLException if buffer is not tracked
+ * @throws GLException if buffer is already mapped
+ * @throws GLException if buffer has invalid store size, i.e. less-than zero
+ */
+ public GLBufferStorage mapNamedBuffer(int bufferName, int access) throws GLException;
+
+ /**
+ * Returns the {@link GLBufferStorage} instance as mapped via OpenGL's native {@link GL4#glMapNamedBufferRange(int, long, long, int) glMapNamedBufferRange(..)} implementation.
+ * <p>
+ * Throws a {@link GLException} if GL-function constraints are not met.
+ * </p>
+ * <p>
+ * Depends on <code>GL_VERSION_4_5</code>.
+ * </p>
+ * <p>
+ * {@link GL4#glMapNamedBufferRange(int, long, long, int)} wrapper calls this method and returns {@link GLBufferStorage#getMappedBuffer()}.
+ * </p>
+ * @param bufferName denotes the buffer
+ * @param offset offset of the mapped buffer's storage
+ * @param length length of the mapped buffer's storage
+ * @param access the mapping access mode
+ * @throws GLException if buffer is not tracked
+ * @throws GLException if buffer is already mapped
+ * @throws GLException if buffer has invalid store size, i.e. less-than zero
+ * @throws GLException if buffer mapping range does not fit, incl. offset
+ */
+ public GLBufferStorage mapNamedBufferRange(final int bufferName, final long offset, final long length, final int access) throws GLException;
+