diff options
author | Sven Gothel <[email protected]> | 2008-08-13 13:22:21 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-08-13 13:22:21 +0000 |
commit | 8beeca6fcb1b5fe98e7c04a208fc208014f35c1f (patch) | |
tree | 033fabe8cf8389aae3ba41b31366b50c661ef13a /make/gl-impl-CustomJavaCode-gl2.java | |
parent | fc37b49b6890531ed87b45956c7d369b46c4fd88 (diff) |
GLArrayData*
- cleanup names and enable/disable code
- bail out if components==0 in GL* impl.
- add passing the VBO name for wrapping VBO server objects
from the fixed function calls
ShaderState:
- reset:
- only pass _enabled_ vertex attribute data in case of a reset
- enable VBO in case of a wrapped VBO server object
Fixed:
- Added glMaterialf to GL (enables Angeles demo)
-
Working: Angeles on ES2
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1755 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/gl-impl-CustomJavaCode-gl2.java')
-rw-r--r-- | make/gl-impl-CustomJavaCode-gl2.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/make/gl-impl-CustomJavaCode-gl2.java b/make/gl-impl-CustomJavaCode-gl2.java index 71e3236b7..d9111f6b1 100644 --- a/make/gl-impl-CustomJavaCode-gl2.java +++ b/make/gl-impl-CustomJavaCode-gl2.java @@ -423,35 +423,39 @@ native private long dispatch_glMapBuffer(int target, int access, long glProcAddr } public void glVertexPointer(GLArrayData array) { + if(array.getComponentNumber()==0) return; if(array.isVBO()) { - glVertexPointer(array.getComponents(), array.getDataType(), array.getStride(), array.getOffset()); + glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset()); } else { - glVertexPointer(array.getComponents(), array.getDataType(), array.getStride(), array.getBuffer()); + glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer()); } } public void glColorPointer(GLArrayData array) { + if(array.getComponentNumber()==0) return; if(array.isVBO()) { - glColorPointer(array.getComponents(), array.getDataType(), array.getStride(), array.getOffset()); + glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset()); } else { - glColorPointer(array.getComponents(), array.getDataType(), array.getStride(), array.getBuffer()); + glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer()); } } public void glNormalPointer(GLArrayData array) { - if(array.getComponents()!=3) { + if(array.getComponentNumber()==0) return; + if(array.getComponentNumber()!=3) { throw new GLException("Only 3 components per normal allowed"); } if(array.isVBO()) { - glNormalPointer(array.getDataType(), array.getStride(), array.getOffset()); + glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset()); } else { - glNormalPointer(array.getDataType(), array.getStride(), array.getBuffer()); + glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer()); } } public void glTexCoordPointer(GLArrayData array) { + if(array.getComponentNumber()==0) return; if(array.isVBO()) { - glTexCoordPointer(array.getComponents(), array.getDataType(), array.getStride(), array.getOffset()); + glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset()); } else { - glTexCoordPointer(array.getComponents(), array.getDataType(), array.getStride(), array.getBuffer()); + glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer()); } } |