aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render/glpoly_t.java
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2005-01-09 22:32:10 +0000
committerCarsten Weisse <[email protected]>2005-01-09 22:32:10 +0000
commit82d30326f04e3cc7d7a3764489d6398017c49fb7 (patch)
tree369f366200ed58c3d7ef390ff89cbeeab6da4a8c /src/jake2/render/glpoly_t.java
parentca78fb14d6851cbf6a420b1c1766a2a00e6aa7fd (diff)
abstract glpoly_t to hide the implementation;
this was done to reduce the memory usage of lwjgl and fastjogl Renderer
Diffstat (limited to 'src/jake2/render/glpoly_t.java')
-rw-r--r--src/jake2/render/glpoly_t.java55
1 files changed, 42 insertions, 13 deletions
diff --git a/src/jake2/render/glpoly_t.java b/src/jake2/render/glpoly_t.java
index 85b1fd0..24019c5 100644
--- a/src/jake2/render/glpoly_t.java
+++ b/src/jake2/render/glpoly_t.java
@@ -19,28 +19,57 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
-// $Id: glpoly_t.java,v 1.2 2004-07-09 06:50:47 hzi Exp $
+// $Id: glpoly_t.java,v 1.3 2005-01-09 22:32:10 cawe Exp $
package jake2.render;
-public class glpoly_t {
- public final static int VERTEXSIZE = 7;
+import jake2.util.Lib;
+public abstract class glpoly_t {
+ public final static int STRIDE = 7;
+ public final static int BYTE_STRIDE = 7 * Lib.SIZEOF_FLOAT;
+ public final static int MAX_VERTICES = 64;
+
public glpoly_t next;
public glpoly_t chain;
public int numverts;
public int flags; // for SURF_UNDERWATER (not needed anymore?)
- public float verts[][] = null; // variable sized (xyz s1t1 s2t2)
-
- public glpoly_t(int numverts) {
- this.verts = new float[numverts][VERTEXSIZE];
- }
- /*
- * vertex array extension
- */
-
// the array position (glDrawArrays)
public int pos = 0;
-}
+ protected glpoly_t() {
+ }
+
+ public abstract float x(int index);
+
+ public abstract void x(int index, float value);
+
+ public abstract float y(int index);
+
+ public abstract void y(int index, float value);
+
+ public abstract float z(int index);
+
+ public abstract void z(int index, float value);
+
+ public abstract float s1(int index);
+
+ public abstract void s1(int index, float value);
+
+ public abstract float t1(int index);
+
+ public abstract void t1(int index, float value);
+
+ public abstract float s2(int index);
+
+ public abstract void s2(int index, float value);
+
+ public abstract float t2(int index);
+
+ public abstract void t2(int index, float value);
+
+ public abstract void beginScrolling(float s1);
+
+ public abstract void endScrolling();
+} \ No newline at end of file