From: Carsten W. <ca...@us...> - 2004-12-14 12:49:23
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24720/src/jake2/client Modified Files: particle_t.java Log Message: the backbuffer of colorArray is a ByteBuffer; we need this for lwjgl Index: particle_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/particle_t.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** particle_t.java 9 Jul 2004 06:50:50 -0000 1.2 --- particle_t.java 14 Dec 2004 12:48:51 -0000 1.3 *************** *** 31,37 **** public class particle_t { public static FloatBuffer vertexArray = Lib.newFloatBuffer(Defines.MAX_PARTICLES * 3); - public static IntBuffer colorArray = Lib.newIntBuffer(Defines.MAX_PARTICLES, ByteOrder.LITTLE_ENDIAN); public static int[] colorTable = new int[256]; public static void setColorPalette(int[] palette) { --- 31,41 ---- public class particle_t { + // lwjgl renderer needs a ByteBuffer + private static ByteBuffer colorByteArray = Lib.newByteBuffer(Defines.MAX_PARTICLES * Lib.SIZEOF_INT, ByteOrder.LITTLE_ENDIAN); + public static FloatBuffer vertexArray = Lib.newFloatBuffer(Defines.MAX_PARTICLES * 3); public static int[] colorTable = new int[256]; + public static IntBuffer colorArray = colorByteArray.asIntBuffer(); + public static void setColorPalette(int[] palette) { *************** *** 40,42 **** --- 44,50 ---- } } + + public static ByteBuffer getColorAsByteBuffer() { + return colorByteArray; + } } |