diff options
author | Carsten Weisse <[email protected]> | 2005-05-07 22:15:05 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-05-07 22:15:05 +0000 |
commit | 826dccd33770d6a84d20d3d9258c61d0474c5e7b (patch) | |
tree | 6e95b10fe40b714cfde7725858aa7abfce36d38c /src/jake2/render/lwjgl | |
parent | 6f3e2d41bd7d2fdbddb3c7f3e859feb5ed9381d2 (diff) |
this reduces the memory footprint massive;
you can now run city3 with 90MB heap
Diffstat (limited to 'src/jake2/render/lwjgl')
-rw-r--r-- | src/jake2/render/lwjgl/Mesh.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/jake2/render/lwjgl/Mesh.java b/src/jake2/render/lwjgl/Mesh.java index 34af9ec..48a62ff 100644 --- a/src/jake2/render/lwjgl/Mesh.java +++ b/src/jake2/render/lwjgl/Mesh.java @@ -2,7 +2,7 @@ * Mesh.java * Copyright (C) 2003 * - * $Id: Mesh.java,v 1.5 2005-02-01 16:55:07 cawe Exp $ + * $Id: Mesh.java,v 1.6 2005-05-07 22:15:05 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -78,11 +78,11 @@ public abstract class Mesh extends Light { */ void GL_LerpVerts(int nverts, qfiles.dtrivertx_t[] ov, qfiles.dtrivertx_t[] verts, float[] move, float[] frontv, float[] backv ) { - int[] ovv; - int[] vv; FloatBuffer lerp = vertexArrayBuf; lerp.limit((nverts << 2) - nverts); // nverts * 3 + qfiles.dtrivertx_t ovv, vv; + //PMM -- added RF_SHELL_DOUBLE, RF_SHELL_HALF_DAM if ( (currententity.flags & ( Defines.RF_SHELL_RED | Defines.RF_SHELL_GREEN | Defines.RF_SHELL_BLUE | Defines.RF_SHELL_DOUBLE | Defines.RF_SHELL_HALF_DAM)) != 0 ) { @@ -90,13 +90,13 @@ public abstract class Mesh extends Light { int j = -1; for (int i=0 ; i < nverts; i++/* , v++, ov++, lerp+=4 */) { - normal = r_avertexnormals[verts[i].lightnormalindex]; - ovv = ov[i].v; - vv = verts[i].v; + normal = r_avertexnormals[verts[i].lightnormalindex()]; + ovv = ov[i]; + vv = verts[i]; - lerp.put(++j, move[0] + ovv[0]*backv[0] + vv[0]*frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); - lerp.put(++j, move[1] + ovv[1]*backv[1] + vv[1]*frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); - lerp.put(++j, move[2] + ovv[2]*backv[2] + vv[2]*frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); + lerp.put(++j, move[0] + ovv.v0() * backv[0] + vv.v0() * frontv[0] + normal[0] * Defines.POWERSUIT_SCALE); + lerp.put(++j, move[1] + ovv.v1() * backv[1] + vv.v1() * frontv[1] + normal[1] * Defines.POWERSUIT_SCALE); + lerp.put(++j, move[2] + ovv.v2() * backv[2] + vv.v2() * frontv[2] + normal[2] * Defines.POWERSUIT_SCALE); } } else @@ -104,12 +104,12 @@ public abstract class Mesh extends Light { int j = -1; for (int i=0 ; i < nverts; i++ /* , v++, ov++, lerp+=4 */) { - ovv = ov[i].v; - vv = verts[i].v; + ovv = ov[i]; + vv = verts[i]; - lerp.put(++j, move[0] + ovv[0]*backv[0] + vv[0]*frontv[0]); - lerp.put(++j, move[1] + ovv[1]*backv[1] + vv[1]*frontv[1]); - lerp.put(++j, move[2] + ovv[2]*backv[2] + vv[2]*frontv[2]); + lerp.put(++j, move[0] + ovv.v0()* backv[0] + vv.v0()*frontv[0]); + lerp.put(++j, move[1] + ovv.v1()* backv[1] + vv.v1()*frontv[1]); + lerp.put(++j, move[2] + ovv.v2()* backv[2] + vv.v2()*frontv[2]); } } } @@ -198,7 +198,7 @@ public abstract class Mesh extends Light { int size = paliashdr.num_xyz; for (int i = 0; i < size; i++ ) { - l = shadedots[verts[i].lightnormalindex]; + l = shadedots[verts[i].lightnormalindex()]; color.put(++j, l * shadelight[0]); color.put(++j, l * shadelight[1]); color.put(++j, l * shadelight[2]); |