I think that’s the problem anyway. All I get out as an error message in eclipse is this:
[quote]Invalid memory access of location 01678824 eip=1acda200
[/quote]
The meat of the code is here:
private static void flushGeometry() {
if (numPolys == 0) return ;
GL11.glMatrixMode(GL11.GL_MODELVIEW) ;
GL11.glLoadIdentity() ;
textBuffer.rewind() ;
normBuffer.rewind() ;
vertBuffer.rewind() ;
huesBuffer.rewind() ;
textBuffer.put(textArray, 0, numPolys * 6) ;
normBuffer.put(normArray, 0, numPolys * 9) ;
vertBuffer.put(vertArray, 0, numPolys * 9) ;
huesBuffer.put(huesArray, 0, numPolys * 9) ;
textBuffer.rewind() ;
normBuffer.rewind() ;
vertBuffer.rewind() ;
huesBuffer.rewind() ;
GL11.glTexCoordPointer(2, GL11.GL_FLOAT, textBuffer) ;
GL11.glNormalPointer(GL11.GL_FLOAT, normBuffer) ;
GL11.glVertexPointer(3, GL11.GL_FLOAT, vertBuffer) ;
GL11.glColorPointer(3, GL11.GL_FLOAT, huesBuffer) ;
GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, numPolys * 3) ;
numPolys = 0 ;
}
If I comment out the second-last line (the call to drawArrays,) there’s no error (but of course, nothing renders.) Any clue what’s happening here?