From: Rene S. <sa...@us...> - 2005-01-16 21:21:54
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29339/src/jake2/render/lwjgl Modified Files: Tag: RST Warp.java LWJGLBase.java Surf.java Model.java Added Files: Tag: RST Polygon.java Log Message: This has vec3-optimize and the OAK bot. Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Warp.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** Warp.java 14 Dec 2004 12:56:59 -0000 1.2 --- Warp.java 16 Jan 2005 21:21:08 -0000 1.2.2.1 *************** *** 29,39 **** import jake2.Globals; import jake2.qcommon.Com; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.msurface_t; import jake2.util.Math3D; - import java.nio.FloatBuffer; - import org.lwjgl.opengl.GL11; --- 29,35 ---- import jake2.Globals; import jake2.qcommon.Com; ! import jake2.render.*; import jake2.util.Math3D; import org.lwjgl.opengl.GL11; *************** *** 195,228 **** // init polys ! glpoly_t poly = new glpoly_t(numverts + 2); poly.next = warpface.polys; warpface.polys = poly; - poly.numverts = numverts + 2; Math3D.VectorClear(total); total_s = 0; total_t = 0; ! for (i=0 ; i<numverts ; i++) ! { ! Math3D.VectorCopy(verts[i], poly.verts[i+1]); ! s = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[0]); ! t = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[1]); ! ! total_s += s; ! total_t += t; ! Math3D.VectorAdd(total, verts[i], total); ! poly.verts[i+1][3] = s; ! poly.verts[i+1][4] = t; ! } ! Math3D.VectorScale(total, (1.0f/numverts), poly.verts[0]); ! poly.verts[0][3] = total_s/numverts; ! poly.verts[0][4] = total_t/numverts; ! // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); ! System.arraycopy(poly.verts[1], 0, poly.verts[i+1], 0, poly.verts[1].length); // :-) ! ! precompilePolygon(poly); } --- 191,230 ---- // init polys ! glpoly_t poly = Polygon.create(numverts + 2); poly.next = warpface.polys; warpface.polys = poly; Math3D.VectorClear(total); total_s = 0; total_t = 0; ! for (i = 0; i < numverts; i++) { ! poly.x(i + 1, verts[i][0]); ! poly.y(i + 1, verts[i][1]); ! poly.z(i + 1, verts[i][2]); ! s = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[0]); ! t = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[1]); ! total_s += s; ! total_t += t; ! Math3D.VectorAdd(total, verts[i], total); ! poly.s1(i + 1, s); ! poly.t1(i + 1, t); ! } ! ! float scale = 1.0f / numverts; ! poly.x(0, total[0] * scale); ! poly.y(0, total[1] * scale); ! poly.z(0, total[2] * scale); ! poly.s1(0, total_s * scale); ! poly.t1(0, total_t * scale); ! poly.x(i + 1, poly.x(1)); ! poly.y(i + 1, poly.y(1)); ! poly.z(i + 1, poly.z(1)); ! poly.s1(i + 1, poly.s1(1)); ! poly.t1(i + 1, poly.t1(1)); ! poly.s2(i + 1, poly.s2(1)); ! poly.t2(i + 1, poly.t2(1)); } *************** *** 236,268 **** ================ */ ! void GL_SubdivideSurface(msurface_t fa) ! { ! float[][] verts = new float[64][3]; ! ! int numverts; ! int i; ! int lindex; ! float[] vec; ! ! warpface = fa; ! ! // ! // convert edges back to a normal polygon ! // ! numverts = 0; ! for (i=0 ; i < fa.numedges ; i++) ! { ! lindex = loadmodel.surfedges[fa.firstedge + i]; ! if (lindex > 0) ! vec = loadmodel.vertexes[loadmodel.edges[lindex].v[0]].position; ! else ! vec = loadmodel.vertexes[loadmodel.edges[-lindex].v[1]].position; ! Math3D.VectorCopy(vec, verts[numverts]); ! numverts++; ! } ! SubdividePolygon(numverts, verts); ! } // ========================================================= --- 238,263 ---- ================ */ ! float[][] tmpVerts = new float[64][3]; ! void GL_SubdivideSurface(msurface_t fa) { ! float[][] verts = tmpVerts; ! float[] vec; ! warpface = fa; ! // ! // convert edges back to a normal polygon ! // ! int numverts = 0; ! for (int i = 0; i < fa.numedges; i++) { ! int lindex = loadmodel.surfedges[fa.firstedge + i]; ! if (lindex > 0) ! vec = loadmodel.vertexes[loadmodel.edges[lindex].v[0]].position; ! else ! vec = loadmodel.vertexes[loadmodel.edges[-lindex].v[1]].position; ! Math3D.VectorCopy(vec, verts[numverts]); ! numverts++; ! } ! SubdividePolygon(numverts, verts); ! } // ========================================================= *************** *** 300,329 **** scroll = 0; ! int index; ! FloatBuffer texCoord = globalPolygonInterleavedBuf; ! for (bp=fa.polys ; bp != null ; bp=bp.next) ! { ! p = bp; ! index = p.pos * POLYGON_STRIDE; ! for (i=0; i<p.numverts ; i++) ! { ! v = p.verts[i]; ! os = v[3]; ! ot = v[4]; ! s = os + Warp.SIN[(int)((ot * 0.125f + r_newrefdef.time) * TURBSCALE) & 255]; ! s += scroll; ! s *= (1.0f/64); ! t = ot + Warp.SIN[(int)((os * 0.125f + rdt) * TURBSCALE) & 255]; ! t *= (1.0f/64); ! texCoord.put(index, s); ! texCoord.put(index + 1, t); ! index += POLYGON_STRIDE; ! } ! gl.glDrawArrays(GL11.GL_TRIANGLE_FAN, p.pos, p.numverts); ! } } --- 295,320 ---- scroll = 0; ! for (bp = fa.polys; bp != null; bp = bp.next) { ! p = bp; ! gl.glBegin(GL11.GL_TRIANGLE_FAN); ! for (i = 0; i < p.numverts; i++) { ! os = p.s1(i); ! ot = p.t1(i); ! s = os ! + Warp.SIN[(int) ((ot * 0.125f + r_newrefdef.time) * TURBSCALE) & 255]; ! s += scroll; ! s *= (1.0f / 64); ! t = ot ! + Warp.SIN[(int) ((os * 0.125f + rdt) * TURBSCALE) & 255]; ! t *= (1.0f / 64); ! gl.glTexCoord2f(s, t); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); ! } ! gl.glEnd(); ! } } *************** *** 555,571 **** void R_AddSkySurface(msurface_t fa) { ! int i; ! glpoly_t p; ! ! // calculate vertex values for sky box ! for (p=fa.polys ; p != null ; p=p.next) ! { ! for (i=0 ; i < p.numverts ; i++) ! { ! Math3D.VectorSubtract(p.verts[i], r_origin, verts[i]); ! } ! ClipSkyPolygon (p.numverts, verts, 0); ! } ! } --- 546,559 ---- void R_AddSkySurface(msurface_t fa) { ! // calculate vertex values for sky box ! for (glpoly_t p = fa.polys; p != null; p = p.next) { ! for (int i = 0; i < p.numverts; i++) { ! verts[i][0] = p.x(i) - r_origin[0]; ! verts[i][1] = p.y(i) - r_origin[1]; ! verts[i][2] = p.z(i) - r_origin[2]; ! } ! ClipSkyPolygon(p.numverts, verts, 0); ! } ! } *************** *** 577,583 **** void R_ClearSkyBox() { ! int i; ! ! for (i=0 ; i<6 ; i++) { skymins[0][i] = skymins[1][i] = 9999; --- 565,569 ---- void R_ClearSkyBox() { ! for (int i=0 ; i<6 ; i++) { skymins[0][i] = skymins[1][i] = 9999; *************** *** 728,732 **** } } - - } --- 714,716 ---- Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Surf.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** Surf.java 16 Dec 2004 21:55:58 -0000 1.4 --- Surf.java 16 Jan 2005 21:21:08 -0000 1.4.2.1 *************** *** 27,49 **** import jake2.Defines; ! import jake2.client.dlight_t; ! import jake2.client.entity_t; ! import jake2.client.lightstyle_t; import jake2.game.cplane_t; import jake2.qcommon.Com; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.medge_t; ! import jake2.render.mleaf_t; ! import jake2.render.mnode_t; ! import jake2.render.model_t; ! import jake2.render.msurface_t; ! import jake2.render.mtexinfo_t; import jake2.util.Lib; import jake2.util.Math3D; ! import java.nio.ByteOrder; ! import java.nio.FloatBuffer; ! import java.nio.IntBuffer; import java.util.Arrays; --- 27,38 ---- import jake2.Defines; ! import jake2.client.*; import jake2.game.cplane_t; import jake2.qcommon.Com; ! import jake2.render.*; import jake2.util.Lib; import jake2.util.Math3D; ! import java.nio.*; import java.util.Arrays; *************** *** 175,187 **** if(scroll == 0.0f) scroll = -64.0f; ! ! FloatBuffer texCoord = globalPolygonInterleavedBuf; ! float[][] v = p.verts; ! int index = p.pos * POLYGON_STRIDE; ! for (i=0 ; i<p.numverts ; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } // PGM --- 164,170 ---- if(scroll == 0.0f) scroll = -64.0f; ! p.beginScrolling(scroll); gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } // PGM *************** *** 193,235 **** void R_DrawTriangleOutlines() { ! int i, j; ! glpoly_t p; ! ! if (gl_showtris.value == 0) ! return; ! ! gl.glDisable (GL11.GL_TEXTURE_2D); ! gl.glDisable (GL11.GL_DEPTH_TEST); ! gl.glColor4f (1,1,1,1); ! for (i=0 ; i<MAX_LIGHTMAPS ; i++) ! { ! msurface_t surf; ! for ( surf = gl_lms.lightmap_surfaces[i]; surf != null; surf = surf.lightmapchain ) ! { ! p = surf.polys; ! for ( ; p != null ; p=p.chain) ! { ! for (j=2 ; j<p.numverts ; j++ ) ! { ! float[] pverts0=p.verts[0]; ! float[] pvertsjm1=p.verts[j-1]; ! float[] pvertsj=p.verts[j]; ! ! ! gl.glBegin (GL11.GL_LINE_STRIP); ! gl.glVertex3f (pverts0[0],pverts0[1],pverts0[2]); ! gl.glVertex3f (pvertsjm1[0],pvertsjm1[1],pvertsjm1[2]); ! gl.glVertex3f (pvertsj[0],pvertsj[1],pvertsj[2]); ! gl.glVertex3f (pverts0[0],pverts0[1],pverts0[2]); ! gl.glEnd (); ! } ! } ! } ! } ! gl.glEnable (GL11.GL_DEPTH_TEST); ! gl.glEnable (GL11.GL_TEXTURE_2D); } --- 176,203 ---- void R_DrawTriangleOutlines() { ! if (gl_showtris.value == 0) ! return; ! gl.glDisable(GL11.GL_TEXTURE_2D); ! gl.glDisable(GL11.GL_DEPTH_TEST); ! gl.glColor4f(1, 1, 1, 1); ! for (int i = 0; i < MAX_LIGHTMAPS; i++) { ! for (msurface_t surf = gl_lms.lightmap_surfaces[i]; surf != null; surf = surf.lightmapchain) { ! for (glpoly_t p = surf.polys; p != null; p = p.chain) { ! for (int j = 2; j < p.numverts; j++) { ! gl.glBegin(GL11.GL_LINE_STRIP); ! gl.glVertex3f(p.x(0), p.y(0), p.z(0)); ! gl.glVertex3f(p.x(j-1), p.y(j-1), p.z(j-1)); ! gl.glVertex3f(p.x(j), p.y(j), p.z(j)); ! gl.glVertex3f(p.x(0), p.y(0), p.z(0)); ! gl.glEnd(); ! } ! } ! } ! } ! gl.glEnable(GL11.GL_DEPTH_TEST); ! gl.glEnable(GL11.GL_TEXTURE_2D); } *************** *** 376,380 **** intens = gl_state.inverse_intensity; ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); for (s=r_alpha_surfaces ; s != null ; s=s.texturechain) --- 344,348 ---- intens = gl_state.inverse_intensity; ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); for (s=r_alpha_surfaces ; s != null ; s=s.texturechain) *************** *** 558,568 **** for ( p = surf.polys; p != null; p = p.chain ) { ! v = p.verts; ! index = p.pos * POLYGON_STRIDE; ! for (i=0 ; i<p.numverts ; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } } --- 526,532 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! p.beginScrolling(scroll); gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } } *************** *** 596,606 **** for ( p = surf.polys; p != null; p = p.chain ) { ! v = p.verts; ! index = p.pos * POLYGON_STRIDE; ! for (i=0 ; i<p.numverts ; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } } --- 560,566 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! p.beginScrolling(scroll); gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } } *************** *** 767,774 **** GL_SelectTexture(GL_TEXTURE0); GL_TexEnv( GL11.GL_REPLACE ); ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(GL_TEXTURE1); GL_TexEnv( GL11.GL_MODULATE ); ! gl.glTexCoordPointer(2, POLYGON_BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); --- 727,734 ---- GL_SelectTexture(GL_TEXTURE0); GL_TexEnv( GL11.GL_REPLACE ); ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(GL_TEXTURE1); GL_TexEnv( GL11.GL_MODULATE ); ! gl.glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); *************** *** 957,963 **** GL_SelectTexture( GL_TEXTURE0); GL_TexEnv( GL11.GL_REPLACE ); ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture( GL_TEXTURE1); ! gl.glTexCoordPointer(2, POLYGON_BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); --- 917,923 ---- GL_SelectTexture( GL_TEXTURE0); GL_TexEnv( GL11.GL_REPLACE ); ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture( GL_TEXTURE1); ! gl.glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); *************** *** 1183,1187 **** float[] vec; float s, t; - glpoly_t poly; float[] total = {0, 0, 0}; --- 1143,1146 ---- *************** *** 1196,1205 **** // // poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * VERTEXSIZE*sizeof(float)); ! poly = new glpoly_t(lnumverts); poly.next = fa.polys; poly.flags = fa.flags; fa.polys = poly; - poly.numverts = lnumverts; for (i=0 ; i<lnumverts ; i++) --- 1155,1163 ---- // // poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * VERTEXSIZE*sizeof(float)); ! glpoly_t poly = Polygon.create(lnumverts); poly.next = fa.polys; poly.flags = fa.flags; fa.polys = poly; for (i=0 ; i<lnumverts ; i++) *************** *** 1224,1230 **** Math3D.VectorAdd (total, vec, total); ! Math3D.VectorCopy (vec, poly.verts[i]); ! poly.verts[i][3] = s; ! poly.verts[i][4] = t; // --- 1182,1191 ---- Math3D.VectorAdd (total, vec, total); ! poly.x(i, vec[0]); ! poly.y(i, vec[1]); ! poly.z(i, vec[2]); ! ! poly.s1(i, s); ! poly.t1(i, t); // *************** *** 1243,1254 **** t /= BLOCK_HEIGHT*16; //fa.texinfo.texture.height; ! poly.verts[i][5] = s; ! poly.verts[i][6] = t; } - - poly.numverts = lnumverts; - - precompilePolygon(poly); - } --- 1204,1210 ---- t /= BLOCK_HEIGHT*16; //fa.texinfo.texture.height; ! poly.s2(i, s); ! poly.t2(i, t); } } *************** *** 1414,1461 **** /* ! * new functions for vertex array handling */ ! static final int POLYGON_BUFFER_SIZE = 120000; ! static final int POLYGON_STRIDE = 7; ! static final int POLYGON_BYTE_STRIDE = POLYGON_STRIDE * Lib.SIZEOF_FLOAT; ! ! static FloatBuffer globalPolygonInterleavedBuf = BufferUtils.createFloatBuffer(POLYGON_BUFFER_SIZE * 7); static FloatBuffer globalPolygonTexCoord1Buf = null; static { ! globalPolygonInterleavedBuf.position(POLYGON_STRIDE - 2); globalPolygonTexCoord1Buf = globalPolygonInterleavedBuf.slice(); globalPolygonInterleavedBuf.position(0); }; - void precompilePolygon(glpoly_t p) { - - p.pos = globalPolygonInterleavedBuf.position() / POLYGON_STRIDE; - - float[] v; - FloatBuffer buffer = globalPolygonInterleavedBuf; - - for (int i = 0; i < p.verts.length; i++) { - v = p.verts[i]; - // textureCoord0 - buffer.put(v[3]); - buffer.put(v[4]); - - // vertex - buffer.put(v[0]); - buffer.put(v[1]); - buffer.put(v[2]); - - // textureCoord1 - buffer.put(v[5]); - buffer.put(v[6]); - } - } - - public static void resetPolygonArrays() { - globalPolygonInterleavedBuf.rewind(); - globalPolygonTexCoord1Buf.rewind(); - } - //ImageFrame frame; --- 1370,1384 ---- /* ! * new buffers for vertex array handling */ ! static FloatBuffer globalPolygonInterleavedBuf = Polygon.getInterleavedBuffer(); static FloatBuffer globalPolygonTexCoord1Buf = null; static { ! globalPolygonInterleavedBuf.position(Polygon.STRIDE - 2); globalPolygonTexCoord1Buf = globalPolygonInterleavedBuf.slice(); globalPolygonInterleavedBuf.position(0); }; //ImageFrame frame; --- NEW FILE: Polygon.java --- /* * Polygon.java * Copyright (C) 2003 * * $Id: Polygon.java,v 1.2.2.1 2005/01/16 21:21:08 salomo Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package jake2.render.lwjgl; import jake2.render.glpoly_t; import jake2.util.Lib; import java.nio.FloatBuffer; /** * Polygon * * @author cwei */ public final class Polygon extends glpoly_t { private final static int MAX_POLYS = 20000; private final static int MAX_BUFFER_VERTICES = 120000; // backup for s1 scrolling private static float[] s1_old = new float[MAX_VERTICES]; private static FloatBuffer buffer = Lib.newFloatBuffer(MAX_BUFFER_VERTICES * STRIDE); private static int bufferIndex = 0; private static int polyCount = 0; private static Polygon[] polyCache = new Polygon[MAX_POLYS]; static { for (int i = 0; i < polyCache.length; i++) { polyCache[i] = new Polygon(); } } static glpoly_t create(int numverts) { Polygon poly = polyCache[polyCount++]; poly.clear(); poly.numverts = numverts; poly.pos = bufferIndex; bufferIndex += numverts; return poly; } static void reset() { polyCount = 0; bufferIndex = 0; } static FloatBuffer getInterleavedBuffer() { return (FloatBuffer)buffer.rewind(); } private Polygon() { } private final void clear() { next = null; chain = null; numverts = 0; flags = 0; } // the interleaved buffer has the format: // textureCoord0 (index 0, 1) // vertex (index 2, 3, 4) // textureCoord1 (index 5, 6) public final float x(int index) { return buffer.get((index + pos) * 7 + 2); } public final void x(int index, float value) { buffer.put((index + pos) * 7 + 2, value); } public final float y(int index) { return buffer.get((index + pos) * 7 + 3); } public final void y(int index, float value) { buffer.put((index + pos) * 7 + 3, value); } public final float z(int index) { return buffer.get((index + pos) * 7 + 4); } public final void z(int index, float value) { buffer.put((index + pos) * 7 + 4, value); } public final float s1(int index) { return buffer.get((index + pos) * 7 + 0); } public final void s1(int index, float value) { buffer.put((index + pos) * 7 + 0, value); } public final float t1(int index) { return buffer.get((index + pos) * 7 + 1); } public final void t1(int index, float value) { buffer.put((index + pos) * 7 + 1, value); } public final float s2(int index) { return buffer.get((index + pos) * 7 + 5); } public final void s2(int index, float value) { buffer.put((index + pos) * 7 + 5, value); } public final float t2(int index) { return buffer.get((index + pos) * 7 + 6); } public final void t2(int index, float value) { buffer.put((index + pos) * 7 + 6, value); } public final void beginScrolling(float scroll) { int index = pos * 7; for (int i = 0; i < numverts; i++, index+=7) { scroll += s1_old[i] = buffer.get(index); buffer.put(index, scroll); } } public final void endScrolling() { int index = pos * 7; for (int i = 0; i < numverts; i++, index+=7) { buffer.put(index, s1_old[i]); } } } Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Model.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Model.java 16 Dec 2004 21:55:58 -0000 1.3 --- Model.java 16 Jan 2005 21:21:08 -0000 1.3.2.1 *************** *** 30,54 **** import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.Com; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.FS; ! import jake2.qcommon.lump_t; ! import jake2.qcommon.qfiles; ! import jake2.qcommon.texinfo_t; ! import jake2.render.medge_t; ! import jake2.render.mleaf_t; ! import jake2.render.mmodel_t; ! import jake2.render.mnode_t; ! import jake2.render.model_t; ! import jake2.render.msurface_t; ! import jake2.render.mtexinfo_t; ! import jake2.render.mvertex_t; import jake2.util.Math3D; import jake2.util.Vargs; ! import java.nio.ByteBuffer; ! import java.nio.ByteOrder; ! import java.nio.FloatBuffer; ! import java.nio.IntBuffer; import java.util.Arrays; import java.util.Vector; --- 30,39 ---- import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.*; ! import jake2.render.*; import jake2.util.Math3D; import jake2.util.Vargs; ! import java.nio.*; import java.util.Arrays; import java.util.Vector; *************** *** 1173,1178 **** { resetModelArrays(); ! resetPolygonArrays(); ! cvar_t flushmap; --- 1158,1163 ---- { resetModelArrays(); ! Polygon.reset(); ! cvar_t flushmap; *************** *** 1262,1267 **** } GL_FreeUnusedImages(); - resetPolygonArrays(); - //modelMemoryUsage(); } --- 1247,1250 ---- |