diff options
author | Carsten Weisse <[email protected]> | 2005-01-22 22:30:35 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-01-22 22:30:35 +0000 |
commit | cb9b3075796ae9a522efdc84536de2e3f709ba5f (patch) | |
tree | 2b5dcff761c7c08ff21d13f85470578284ad18d9 /src/jake2/render/fastjogl | |
parent | 7bb01ab7abb251897a16ed43572b5fe22859a019 (diff) |
simplified
Diffstat (limited to 'src/jake2/render/fastjogl')
-rw-r--r-- | src/jake2/render/fastjogl/Mesh.java | 10 | ||||
-rw-r--r-- | src/jake2/render/fastjogl/Model.java | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/jake2/render/fastjogl/Mesh.java b/src/jake2/render/fastjogl/Mesh.java index a5b86b6..670722e 100644 --- a/src/jake2/render/fastjogl/Mesh.java +++ b/src/jake2/render/fastjogl/Mesh.java @@ -2,7 +2,7 @@ * Mesh.java * Copyright (C) 2003 * - * $Id: Mesh.java,v 1.7 2005-01-16 15:24:50 cawe Exp $ + * $Id: Mesh.java,v 1.8 2005-01-22 22:30:35 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -226,7 +226,6 @@ public abstract class Mesh extends Light { FloatBuffer dstTextureCoords = textureArrayBuf; FloatBuffer srcTextureCoords = paliashdr.textureCoordBuf; - int size = 0; int dstIndex = 0; int srcIndex = 0; @@ -244,10 +243,9 @@ public abstract class Mesh extends Light { mode = GL.GL_TRIANGLE_FAN; count = -count; } - size = count + pos; - srcIndex = 2 * pos; - for (int k = pos; k < size; k++) { - dstIndex = 2 * srcIndexBuf.get(k - pos); + srcIndex = pos << 1; + for (int k = 0; k < count; k++) { + dstIndex = srcIndexBuf.get(k) << 1; dstTextureCoords.put(dstIndex++, srcTextureCoords .get(srcIndex++)); dstTextureCoords diff --git a/src/jake2/render/fastjogl/Model.java b/src/jake2/render/fastjogl/Model.java index cdba057..9b42fd0 100644 --- a/src/jake2/render/fastjogl/Model.java +++ b/src/jake2/render/fastjogl/Model.java @@ -2,7 +2,7 @@ * Model.java * Copyright (C) 2003 * - * $Id: Model.java,v 1.7 2005-01-10 00:14:32 cawe Exp $ + * $Id: Model.java,v 1.8 2005-01-22 22:30:35 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -1237,6 +1237,7 @@ public abstract class Model extends Surf { count = (count < 0) ? -count : count; model.vertexIndexBuf.position(pos); model.indexElements[i] = model.vertexIndexBuf.slice(); + model.indexElements[i].limit(count); pos += count; } } |