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 --- src/jogl/classes/javax/media/opengl/GLUniformData.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/GLUniformData.java') diff --git a/src/jogl/classes/javax/media/opengl/GLUniformData.java b/src/jogl/classes/javax/media/opengl/GLUniformData.java index 9b0d5f151..5c9388be2 100644 --- a/src/jogl/classes/javax/media/opengl/GLUniformData.java +++ b/src/jogl/classes/javax/media/opengl/GLUniformData.java @@ -59,10 +59,10 @@ public class GLUniformData { init(name, rows, columns, data); } - public void setData(int data) { init(new Integer(data)); } - public void setData(float data) { init(new Float(data)); } - public void setData(IntBuffer data) { init(data); } - public void setData(FloatBuffer data) { init(data); } + public GLUniformData setData(int data) { init(new Integer(data)); return this; } + public GLUniformData setData(float data) { init(new Float(data)); return this; } + public GLUniformData setData(IntBuffer data) { init(data); return this; } + public GLUniformData setData(FloatBuffer data) { init(data); return this; } public int intValue() { return ((Integer)data).intValue(); }; public float floatValue() { return ((Float)data).floatValue(); }; @@ -105,8 +105,8 @@ public class GLUniformData { private void init(Object data) { if(data instanceof Buffer) { - int sz = rows*columns; - Buffer buffer = (Buffer)data; + final int sz = rows*columns; + final Buffer buffer = (Buffer)data; if(buffer.limit()