diff options
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()); } } |