aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-12 21:38:36 +0200
committerSven Gothel <[email protected]>2012-10-12 21:38:36 +0200
commit1992d24671f8d99abccb671b8f9d5a7cd474fd00 (patch)
tree108ada7dcba74e5700861caf6fbc80673c4eeb45 /src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java
parent2958508131e5f0b3336f07c6f1c2865eb954921b (diff)
GLArrayData* VBO binding: Properly document and impl. bindBuffer(..) in detail w/ data sync within GLArrayHandle,
which also removed redundant code (VBO data sync and binding). Refines commit 8582ece7dc7f65271b3184261697a542766d9864 and f49f8e22953ed2426fd4264ee407e2dc3fc07cfc
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java
index 2049f9618..a6314a216 100644
--- a/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java
+++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java
@@ -37,12 +37,28 @@ import javax.media.opengl.*;
*/
public interface GLArrayHandler {
+
+ /**
+ * if <code>bind</code> is true and the data uses VBO,
+ * the latter will be bound and data written to the GPU if required.
+ * <p>
+ * If <code>bind</code> is false and the data uses VBO,
+ * the latter will be unbound.
+ * </p>
+ *
+ * @param gl current GL object
+ * @param bind true if VBO shall be bound and data written,
+ * otherwise clear VBO binding.
+ * @return true if data uses VBO and action was performed, otherwise false
+ */
+ public boolean bindBuffer(GL gl, boolean bind);
+
/**
* Implementation shall enable or disable the array state.
* <p>
* Before enabling the array state,
- * implementation shall associate the data with the array
- * and synchronize the data with the GPU.
+ * implementation shall synchronize the data with the GPU
+ * and associate the data with the array.
* </p>
*
* @param gl current GL object