From 6c346d98f04e2355210960fe9ffde47432f04d62 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 22 Aug 2011 01:59:00 +0200 Subject: Misc Rename/Reloc; GLArrayData*/PMVMatrix enhancments; Test fixes/adds (GearsES1/ES2) rename/reloc: - javax.media.nativewindow.util: DimensionReadOnly -> DimensionImmutable PointReadOnly -> PointImmutable RectangleReadOnly -> RectangleImmutable unified 'immutable' name as used within jogamp already - remove array handler from public API com.jogamp.opengl.util.GL*ArrayHandler -> jogamp.opengl.util.GL*ArrayHandler - GLArrayData: Clarify method names getComponentNumber() -> getComponentCount() getComponentSize() -> getComponentSizeInBytes() getElementNumber() -> getElementCount() getByteSize() -> getSizeInBytes() - FixedFuncPipeline: Moved def. array names to GLPointerFuncUtil enhancement: - GLArrayDataServer: Add support for interleaved arrays/VBO - GLArrayData*.createFixed(..) remove 'name' argument (non sense for fixed function) - PMVMatrix: - one nio buffer - removed 'Pmv' multiplied matrix - removed 2x2 cut down 'Mvi' normal matrix (use 4x4 Mvi) - tests: - RedSquare -> RedSquareES1/RedSquareES2 - Gears ES1 fixed + ES2 added. Both work properly and share common Gears VBO construction - Added TestMapBuffer01NEWT, testing glMapBuffer --- .../com/jogamp/opengl/util/GLArrayHandler.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/jogl/classes/com/jogamp/opengl/util/GLArrayHandler.java') diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayHandler.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayHandler.java index bfabb5b01..ee80c4299 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayHandler.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayHandler.java @@ -3,9 +3,30 @@ package com.jogamp.opengl.util; import javax.media.opengl.*; +/** + * Handles consistency of buffer data and array state. + * Implementations shall consider buffer types (VBO, ..), interleaved, etc. + * They also need to consider array state types, i.e. fixed function or GLSL. + */ public interface GLArrayHandler { + /** + * Implementation shall ensure the buffers data is synchronized to the GPU + * and the array state is enabled. + * + * @param gl current GL object + * @param enable true if array shall be enabled, otherwise false. + */ public void enableBuffer(GL gl, boolean enable); + + /** + * Supporting interleaved arrays, where sub handlers may handle + * the array state and the master handler the buffer consistency. + * + * @param handler the sub handler + * @throws UnsupportedOperationException if this array handler does not support interleaved arrays + */ + public void addSubHandler(GLArrayHandler handler) throws UnsupportedOperationException; } -- cgit v1.2.3