From: Elias N. <na...@od...> - 2002-10-31 07:16:46
|
On Wednesday 30 October 2002 20:08, Peter wrote: > > > One definite difference between my code and JCanyon is that I'm not > > > using the NIO direct buffers, though OTOH I'm using display lists, > > so > > > > that shouldn't matter beyond the initial access. > > > > no, that is not correct. Java can move your vertex/normal/whatever > > arrays > > > around underneath you before your get the chance to call > > glArrayElement > > > (or > > similar). > > As I said in my post, I'm using *Display Lists*. It doesn't matter wha= t > happens to the arrays after the lists are made (altering the arrays has > no effect on the data stored in the list whatsoever) > Your arrays can be moved around *before* you create the display list, and= =20 after you specify the array. To create a display list your would do somet= hing=20 like this: float[] vertex_array; int[] indices; =2E.. glVertexPointer(..., vertex_array); =2E.. <- It it here, between the array call, and the draw call that your= vertex=20 data arrays can move around. glDrawElements(...., indices); And yes, that gap between glVertexPointer and glDrawElements is normally = very=20 small, but believe me, it can happen. - elias |