diff options
author | Sven Gothel <[email protected]> | 2011-08-22 01:59:00 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-22 01:59:00 +0200 |
commit | 6c346d98f04e2355210960fe9ffde47432f04d62 (patch) | |
tree | 938536365abee309d5acf9ada1ac75bc1a49e939 /src/jogl/classes/javax/media/opengl/GLUniformData.java | |
parent | 47b0d317df3c860b6cf3ea10196dfee82b3b3dc1 (diff) |
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
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLUniformData.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLUniformData.java | 14 |
1 files changed, 7 insertions, 7 deletions
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()<sz || 0!=buffer.limit()%sz) { throw new GLException("data buffer size invalid: new buffer limit: "+buffer.limit()+"\n\t"+this); } @@ -127,7 +127,7 @@ public class GLUniformData { /** * Sets the determined location of the shader uniform. */ - public void setLocation(int location) { this.location=location; } + public GLUniformData setLocation(int location) { this.location=location; return this; } public Object getObject() { return data; |