You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(52) |
Aug
(34) |
Sep
(99) |
Oct
(110) |
Nov
(21) |
Dec
(69) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(117) |
Feb
(90) |
Mar
(1) |
Apr
(22) |
May
(96) |
Jun
(25) |
Jul
(22) |
Aug
|
Sep
|
Oct
(18) |
Nov
(43) |
Dec
(71) |
2006 |
Jan
(20) |
Feb
(10) |
Mar
|
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(60) |
Nov
(63) |
Dec
(35) |
2007 |
Jan
(18) |
Feb
(40) |
Mar
(14) |
Apr
(18) |
May
(33) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
(25) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Carsten W. <ca...@us...> - 2005-10-24 21:02:47
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11614/src/jake2/render/jogl Modified Files: Tag: render-refactoring Image.java Log Message: copy only what's needed Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Image.java,v retrieving revision 1.6.12.1 retrieving revision 1.6.12.2 diff -C2 -d -r1.6.12.1 -r1.6.12.2 *** Image.java 16 Jul 2005 18:25:37 -0000 1.6.12.1 --- Image.java 24 Oct 2005 21:02:27 -0000 1.6.12.2 *************** *** 1144,1148 **** } else { tex.clear(); ! tex.put(data).flip(); gl.glTexImage2D(GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, --- 1144,1148 ---- } else { tex.clear(); ! tex.put(data, 0, scaled_width * scaled_height).flip(); gl.glTexImage2D(GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, *************** *** 1171,1175 **** } else { tex.clear(); ! tex.put(scaled).flip(); gl.glTexImage2D(GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex); --- 1171,1175 ---- } else { tex.clear(); ! tex.put(scaled, 0, scaled_width * scaled_height).flip(); gl.glTexImage2D(GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex); *************** *** 1201,1205 **** } else { tex.clear(); ! tex.put(scaled).flip(); gl.glTexImage2D(GL_TEXTURE_2D, miplevel, comp, scaled_width, scaled_height, 0, GL_RGBA, --- 1201,1205 ---- } else { tex.clear(); ! tex.put(scaled, 0, scaled_width * scaled_height).flip(); gl.glTexImage2D(GL_TEXTURE_2D, miplevel, comp, scaled_width, scaled_height, 0, GL_RGBA, |
From: Carsten W. <ca...@us...> - 2005-10-24 21:01:05
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11169/src/jake2/render/jogl Modified Files: Tag: render-refactoring Light.java Log Message: code cleanup Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Light.java,v retrieving revision 1.7.12.1 retrieving revision 1.7.12.2 diff -C2 -d -r1.7.12.1 -r1.7.12.2 *** Light.java 16 Jul 2005 18:25:37 -0000 1.7.12.1 --- Light.java 24 Oct 2005 21:00:57 -0000 1.7.12.2 *************** *** 591,595 **** if (monolightmap == '0') { for (i = 0; i < tmax; i++, destp += stride) { ! for (j = 0; j < smax; j++, destp++) { r = (int) bl[blp++]; --- 591,595 ---- if (monolightmap == '0') { for (i = 0; i < tmax; i++, destp += stride) { ! for (j = 0; j < smax; j++) { r = (int) bl[blp++]; *************** *** 638,642 **** b &= 0xFF; a &= 0xFF; ! dest.put(destp, (a << 24) | (b << 16) | (g << 8) | (r << 0)); } --- 638,642 ---- b &= 0xFF; a &= 0xFF; ! dest.put(destp++, (a << 24) | (b << 16) | (g << 8) | (r << 0)); } *************** *** 644,648 **** } else { for (i = 0; i < tmax; i++, destp += stride) { ! for (j = 0; j < smax; j++, destp++) { r = (int) bl[blp++]; --- 644,648 ---- } else { for (i = 0; i < tmax; i++, destp += stride) { ! for (j = 0; j < smax; j++) { r = (int) bl[blp++]; *************** *** 716,720 **** b &= 0xFF; a &= 0xFF; ! dest.put(destp, (a << 24) | (b << 16) | (g << 8) | (r << 0)); } --- 716,720 ---- b &= 0xFF; a &= 0xFF; ! dest.put(destp++, (a << 24) | (b << 16) | (g << 8) | (r << 0)); } |
From: Carsten W. <ca...@us...> - 2005-10-24 20:59:30
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10769/src/jake2/render/lwjgl Modified Files: Tag: render-refactoring Light.java Log Message: old code removed Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Light.java,v retrieving revision 1.4.6.2 retrieving revision 1.4.6.3 diff -C2 -d -r1.4.6.2 -r1.4.6.3 *** Light.java 16 Jul 2005 18:22:37 -0000 1.4.6.2 --- Light.java 24 Oct 2005 20:59:22 -0000 1.4.6.3 *************** *** 625,630 **** if (monolightmap == '0') { for (i = 0; i < tmax; i++, destp += stride) { - //dest.position(destp); - for (j = 0; j < smax; j++) { --- 625,628 ---- *************** *** 676,681 **** } else { for (i = 0; i < tmax; i++, destp += stride) { - //dest.position(destp); - for (j = 0; j < smax; j++) { --- 674,677 ---- |
From: Holger Z. <hz...@us...> - 2005-10-07 06:00:58
|
Update of /cvsroot/jake2/jake2/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23841/scripts Modified Files: Jake2_mac_lwjgl.sh Log Message: fixes for OS X Index: Jake2_mac_lwjgl.sh =================================================================== RCS file: /cvsroot/jake2/jake2/scripts/Jake2_mac_lwjgl.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jake2_mac_lwjgl.sh 26 May 2005 16:56:31 -0000 1.2 --- Jake2_mac_lwjgl.sh 7 Oct 2005 06:00:48 -0000 1.3 *************** *** 1,5 **** #!/bin/sh ! export LD_LIBRARY_PATH=lib/linux/osx CP=lib/jake2.jar:lib/lwjgl.jar:lib/lwjgl_util.jar --- 1,5 ---- #!/bin/sh ! export LD_LIBRARY_PATH=lib/osx CP=lib/jake2.jar:lib/lwjgl.jar:lib/lwjgl_util.jar |
From: Holger Z. <hz...@us...> - 2005-10-07 06:00:56
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23841 Modified Files: build.xml Log Message: fixes for OS X Index: build.xml =================================================================== RCS file: /cvsroot/jake2/jake2/build.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** build.xml 7 Jun 2005 08:50:12 -0000 1.26 --- build.xml 7 Oct 2005 06:00:48 -0000 1.27 *************** *** 144,147 **** --- 144,150 ---- <include name="mirrors"/> </jar> + <condition property="classes" value="${java.home}/../Classes/classes.jar" else="${java.home}/lib/rt.jar"> + <os name="Mac OS X"/> + </condition> <!-- proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar" defaultpackage="" overloadaggressively="off" printmapping="jake2.map"> *************** *** 149,153 **** <libraryjar name="lib/jogl/jogl.jar"/> <libraryjar name="lib/joal/linux/joal.jar"/> ! <libraryjar name="${java.home}/lib/rt.jar"/> <keep access="public" name="jake2.Jake2"> <method name="main(java.lang.String[])"/> --- 152,156 ---- <libraryjar name="lib/jogl/jogl.jar"/> <libraryjar name="lib/joal/linux/joal.jar"/> ! <libraryjar name="${classes}"/> <keep access="public" name="jake2.Jake2"> <method name="main(java.lang.String[])"/> |
From: Carsten W. <ca...@us...> - 2005-07-16 18:25:47
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10687/src/jake2/render/jogl Modified Files: Tag: render-refactoring Image.java Base.java Draw.java Misc.java Main.java Warp.java Surf.java Mesh.java Light.java Log Message: modified to use the QGL interface Index: Base.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Base.java,v retrieving revision 1.2 retrieving revision 1.2.12.1 diff -C2 -d -r1.2 -r1.2.12.1 *** Base.java 15 Jul 2004 14:37:34 -0000 1.2 --- Base.java 16 Jul 2005 18:25:37 -0000 1.2.12.1 *************** *** 26,31 **** package jake2.render.jogl; ! import jake2.render.JoglBase; ! import net.java.games.jogl.GL; /** --- 26,34 ---- package jake2.render.jogl; ! import jake2.client.viddef_t; ! import jake2.game.cvar_t; ! import jake2.render.*; ! ! import java.awt.Dimension; /** *************** *** 34,40 **** * @author cwei */ ! public abstract class Base extends JoglBase { ! static final int GL_COLOR_INDEX8_EXT = GL.GL_COLOR_INDEX; static final String REF_VERSION = "GL 0.01"; --- 37,43 ---- * @author cwei */ ! public abstract class Base implements QGLConst { ! static final int GL_COLOR_INDEX8_EXT = GL_COLOR_INDEX; static final String REF_VERSION = "GL 0.01"; *************** *** 230,295 **** static final int GL_RENDERER_OTHER = 0x80000000; ! // typedef struct ! // { ! // int renderer; ! // const char *renderer_string; ! // const char *vendor_string; ! // const char *version_string; ! // const char *extensions_string; ! // ! // qboolean allow_cds; ! // } glconfig_t; ! // ! // typedef struct ! // { ! // float inverse_intensity; ! // qboolean fullscreen; ! // ! // int prev_mode; ! // ! // unsigned char *d_16to8table; ! // ! // int lightmap_textures; ! // ! // int currenttextures[2]; ! // int currenttmu; ! // ! // float camera_separation; ! // qboolean stereo_enabled; ! // ! // unsigned char originalRedGammaTable[256]; ! // unsigned char originalGreenGammaTable[256]; ! // unsigned char originalBlueGammaTable[256]; ! // } glstate_t; ! // ! // /* ! // ==================================================================== ! // ! // IMPORTED FUNCTIONS ! // ! // ==================================================================== ! // */ ! // ! // extern refimport_t ri; ! // ! // ! // /* ! // ==================================================================== ! // ! // IMPLEMENTATION SPECIFIC FUNCTIONS ! // ! // ==================================================================== ! // */ ! // ! // void GLimp_BeginFrame( float camera_separation ); ! // void GLimp_EndFrame( void ); ! // int GLimp_Init( void *hinstance, void *hWnd ); ! // void GLimp_Shutdown( void ); ! // int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen ); ! // void GLimp_AppActivate( qboolean active ); ! // void GLimp_EnableLogging( qboolean enable ); ! // void GLimp_LogNewFrame( void ); ! // } --- 233,275 ---- static final int GL_RENDERER_OTHER = 0x80000000; + /* + * base members + */ ! protected viddef_t vid = new viddef_t(); ! ! protected cvar_t vid_fullscreen; ! ! protected QGL gl = LwjglGL.getInstance();//DummyGL.getInstance(); ! ! // enum rserr_t ! protected static final int rserr_ok = 0; ! ! protected static final int rserr_invalid_fullscreen = 1; ! ! protected static final int rserr_invalid_mode = 2; ! ! protected static final int rserr_unknown = 3; ! ! protected abstract int GLimp_SetMode(Dimension dim, int mode, ! boolean fullscreen); ! ! protected abstract void GLimp_Shutdown(); ! ! protected void GLimp_BeginFrame(float camera_separation) { ! // do nothing ! } ! ! protected void GLimp_AppActivate(boolean activate) { ! // do nothing ! } ! ! protected void GLimp_EnableLogging(boolean enable) { ! // do nothing ! } ! ! protected void GLimp_LogNewFrame() { ! // do nothing ! } } Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Image.java,v retrieving revision 1.6 retrieving revision 1.6.12.1 diff -C2 -d -r1.6 -r1.6.12.1 *** Image.java 22 Sep 2004 19:22:16 -0000 1.6 --- Image.java 16 Jul 2005 18:25:37 -0000 1.6.12.1 *************** *** 43,52 **** import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; ! import java.nio.ByteBuffer; ! import java.nio.ByteOrder; ! import java.nio.IntBuffer; import java.util.Arrays; - import net.java.games.jogl.GL; /** --- 43,49 ---- import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; ! import java.nio.*; import java.util.Arrays; /** *************** *** 87,93 **** int gl_tex_alpha_format = 4; ! int gl_filter_min = GL.GL_LINEAR_MIPMAP_NEAREST; ! int gl_filter_max = GL.GL_LINEAR; Image() { --- 84,90 ---- int gl_tex_alpha_format = 4; ! int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST; ! int gl_filter_max = GL_LINEAR; Image() { *************** *** 103,118 **** assert (palette != null && palette.length == 256) : "int palette[256] bug"; - int i; - byte[] temptable = new byte[768]; - if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f) { ! for (i = 0; i < 256; i++) { ! temptable[i * 3 + 0] = (byte) ((palette[i] >> 0) & 0xff); ! temptable[i * 3 + 1] = (byte) ((palette[i] >> 8) & 0xff); ! temptable[i * 3 + 2] = (byte) ((palette[i] >> 16) & 0xff); } ! gl.glColorTableEXT(GL.GL_SHARED_TEXTURE_PALETTE_EXT, GL.GL_RGB, ! 256, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, temptable); } } --- 100,112 ---- assert (palette != null && palette.length == 256) : "int palette[256] bug"; if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f) { ! ByteBuffer temptable = Lib.newByteBuffer(768); ! for (int i = 0; i < 256; i++) { ! temptable.put(i * 3 + 0, (byte) ((palette[i] >> 0) & 0xff)); ! temptable.put(i * 3 + 1, (byte) ((palette[i] >> 8) & 0xff)); ! temptable.put(i * 3 + 2, (byte) ((palette[i] >> 16) & 0xff)); } ! gl.glColorTable(GL_SHARED_TEXTURE_PALETTE_EXT, GL_RGB, 256, GL_RGB, GL_UNSIGNED_BYTE, temptable); } } *************** *** 124,136 **** if (enable) { GL_SelectTexture(GL_TEXTURE1); ! gl.glEnable(GL.GL_TEXTURE_2D); ! GL_TexEnv(GL.GL_REPLACE); } else { GL_SelectTexture(GL_TEXTURE1); ! gl.glDisable(GL.GL_TEXTURE_2D); ! GL_TexEnv(GL.GL_REPLACE); } GL_SelectTexture(GL_TEXTURE0); ! GL_TexEnv(GL.GL_REPLACE); } --- 118,130 ---- if (enable) { GL_SelectTexture(GL_TEXTURE1); ! gl.glEnable(GL_TEXTURE_2D); ! GL_TexEnv(GL_REPLACE); } else { GL_SelectTexture(GL_TEXTURE1); ! gl.glDisable(GL_TEXTURE_2D); ! GL_TexEnv(GL_REPLACE); } GL_SelectTexture(GL_TEXTURE0); ! GL_TexEnv(GL_REPLACE); } *************** *** 155,159 **** if (qglSelectTextureSGIS) { // TODO handle this: gl.glSelectTextureSGIS(texture); ! gl.glActiveTexture(texture); } else if (qglActiveTextureARB) { gl.glActiveTextureARB(texture); --- 149,153 ---- if (qglSelectTextureSGIS) { // TODO handle this: gl.glSelectTextureSGIS(texture); ! gl.glActiveTextureARB(texture); } else if (qglActiveTextureARB) { gl.glActiveTextureARB(texture); *************** *** 168,172 **** if (mode != lastmodes[gl_state.currenttmu]) { ! gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, mode); lastmodes[gl_state.currenttmu] = mode; } --- 162,166 ---- if (mode != lastmodes[gl_state.currenttmu]) { ! gl.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode); lastmodes[gl_state.currenttmu] = mode; } *************** *** 183,187 **** gl_state.currenttextures[gl_state.currenttmu] = texnum; ! gl.glBindTexture(GL.GL_TEXTURE_2D, texnum); } --- 177,181 ---- gl_state.currenttextures[gl_state.currenttmu] = texnum; ! gl.glBindTexture(GL_TEXTURE_2D, texnum); } *************** *** 213,226 **** static final glmode_t modes[] = { ! new glmode_t("GL_NEAREST", GL.GL_NEAREST, GL.GL_NEAREST), ! new glmode_t("GL_LINEAR", GL.GL_LINEAR, GL.GL_LINEAR), new glmode_t("GL_NEAREST_MIPMAP_NEAREST", ! GL.GL_NEAREST_MIPMAP_NEAREST, GL.GL_NEAREST), new glmode_t("GL_LINEAR_MIPMAP_NEAREST", ! GL.GL_LINEAR_MIPMAP_NEAREST, GL.GL_LINEAR), new glmode_t("GL_NEAREST_MIPMAP_LINEAR", ! GL.GL_NEAREST_MIPMAP_LINEAR, GL.GL_NEAREST), ! new glmode_t("GL_LINEAR_MIPMAP_LINEAR", GL.GL_LINEAR_MIPMAP_LINEAR, ! GL.GL_LINEAR) }; static final int NUM_GL_MODES = modes.length; --- 207,220 ---- static final glmode_t modes[] = { ! new glmode_t("GL_NEAREST", GL_NEAREST, GL_NEAREST), ! new glmode_t("GL_LINEAR", GL_LINEAR, GL_LINEAR), new glmode_t("GL_NEAREST_MIPMAP_NEAREST", ! GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST), new glmode_t("GL_LINEAR_MIPMAP_NEAREST", ! GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR), new glmode_t("GL_NEAREST_MIPMAP_LINEAR", ! GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST), ! new glmode_t("GL_LINEAR_MIPMAP_LINEAR", GL_LINEAR_MIPMAP_LINEAR, ! GL_LINEAR) }; static final int NUM_GL_MODES = modes.length; *************** *** 239,259 **** static final gltmode_t[] gl_alpha_modes = { new gltmode_t("default", 4), ! new gltmode_t("GL_RGBA", GL.GL_RGBA), ! new gltmode_t("GL_RGBA8", GL.GL_RGBA8), ! new gltmode_t("GL_RGB5_A1", GL.GL_RGB5_A1), ! new gltmode_t("GL_RGBA4", GL.GL_RGBA4), ! new gltmode_t("GL_RGBA2", GL.GL_RGBA2), }; static final int NUM_GL_ALPHA_MODES = gl_alpha_modes.length; static final gltmode_t[] gl_solid_modes = { new gltmode_t("default", 3), ! new gltmode_t("GL_RGB", GL.GL_RGB), ! new gltmode_t("GL_RGB8", GL.GL_RGB8), ! new gltmode_t("GL_RGB5", GL.GL_RGB5), ! new gltmode_t("GL_RGB4", GL.GL_RGB4), ! new gltmode_t("GL_R3_G3_B2", GL.GL_R3_G3_B2), ! // #ifdef GL_RGB2_EXT ! new gltmode_t("GL_RGB2", GL.GL_RGB2_EXT) ! // #endif }; --- 233,250 ---- static final gltmode_t[] gl_alpha_modes = { new gltmode_t("default", 4), ! new gltmode_t("GL_RGBA", GL_RGBA), ! new gltmode_t("GL_RGBA8", GL_RGBA8), ! new gltmode_t("GL_RGB5_A1", GL_RGB5_A1), ! new gltmode_t("GL_RGBA4", GL_RGBA4), ! new gltmode_t("GL_RGBA2", GL_RGBA2), }; static final int NUM_GL_ALPHA_MODES = gl_alpha_modes.length; static final gltmode_t[] gl_solid_modes = { new gltmode_t("default", 3), ! new gltmode_t("GL_RGB", GL_RGB), ! new gltmode_t("GL_RGB8", GL_RGB8), ! new gltmode_t("GL_RGB5", GL_RGB5), ! new gltmode_t("GL_RGB4", GL_RGB4), ! new gltmode_t("GL_R3_G3_B2", GL_R3_G3_B2), }; *************** *** 288,294 **** if (glt.type != it_pic && glt.type != it_sky) { GL_Bind(glt.texnum); ! gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, gl_filter_min); ! gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, gl_filter_max); } --- 279,285 ---- if (glt.type != it_pic && glt.type != it_sky) { GL_Bind(glt.texnum); ! gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); ! gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } *************** *** 1039,1043 **** * Returns has_alpha =============== */ ! void GL_BuildPalettedTexture(byte[] paletted_texture, int[] scaled, int scaled_width, int scaled_height) { --- 1030,1034 ---- * Returns has_alpha =============== */ ! void GL_BuildPalettedTexture(ByteBuffer paletted_texture, int[] scaled, int scaled_width, int scaled_height) { *************** *** 1053,1057 **** c = r | (g << 5) | (b << 11); ! paletted_texture[i] = gl_state.d_16to8table[c]; } } --- 1044,1048 ---- c = r | (g << 5) | (b << 11); ! paletted_texture.put(i, gl_state.d_16to8table[c]); } } *************** *** 1068,1072 **** int[] scaled = new int[256 * 256]; ! byte[] paletted_texture = new byte[256 * 256]; IntBuffer tex = Lib.newIntBuffer(512 * 256, ByteOrder.LITTLE_ENDIAN); --- 1059,1063 ---- int[] scaled = new int[256 * 256]; ! ByteBuffer paletted_texture = Lib.newByteBuffer(256*256); IntBuffer tex = Lib.newIntBuffer(512 * 256, ByteOrder.LITTLE_ENDIAN); *************** *** 1079,1084 **** Arrays.fill(scaled, 0); ! Arrays.fill(paletted_texture, (byte) 0); ! uploaded_paletted = false; --- 1070,1076 ---- Arrays.fill(scaled, 0); ! paletted_texture.clear(); ! for (int j=0; j<256*256; j++) paletted_texture.put(j,(byte)0); ! uploaded_paletted = false; *************** *** 1146,1159 **** GL_BuildPalettedTexture(paletted_texture, data, scaled_width, scaled_height); ! gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, scaled_width, ! scaled_height, 0, GL.GL_COLOR_INDEX, ! GL.GL_UNSIGNED_BYTE, paletted_texture); } else { ! tex.rewind(); ! tex.put(data); ! gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, comp, ! scaled_width, scaled_height, 0, GL.GL_RGBA, ! GL.GL_UNSIGNED_BYTE, tex); } //goto done; --- 1138,1151 ---- GL_BuildPalettedTexture(paletted_texture, data, scaled_width, scaled_height); ! gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, scaled_width, ! scaled_height, 0, GL_COLOR_INDEX, ! GL_UNSIGNED_BYTE, paletted_texture); } else { ! tex.clear(); ! tex.put(data).flip(); ! gl.glTexImage2D(GL_TEXTURE_2D, 0, comp, ! scaled_width, scaled_height, 0, GL_RGBA, ! GL_UNSIGNED_BYTE, tex); } //goto done; *************** *** 1174,1185 **** GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, ! scaled_width, scaled_height, 0, GL.GL_COLOR_INDEX, ! GL.GL_UNSIGNED_BYTE, paletted_texture); } else { ! tex.rewind(); ! tex.put(scaled); ! gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, comp, scaled_width, ! scaled_height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, tex); } --- 1166,1177 ---- GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, ! scaled_width, scaled_height, 0, GL_COLOR_INDEX, ! GL_UNSIGNED_BYTE, paletted_texture); } else { ! tex.clear(); ! tex.put(scaled).flip(); ! gl.glTexImage2D(GL_TEXTURE_2D, 0, comp, scaled_width, ! scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex); } *************** *** 1203,1216 **** GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! gl.glTexImage2D(GL.GL_TEXTURE_2D, miplevel, GL_COLOR_INDEX8_EXT, scaled_width, ! scaled_height, 0, GL.GL_COLOR_INDEX, ! GL.GL_UNSIGNED_BYTE, paletted_texture); } else { ! tex.rewind(); ! tex.put(scaled); ! gl.glTexImage2D(GL.GL_TEXTURE_2D, miplevel, comp, ! scaled_width, scaled_height, 0, GL.GL_RGBA, ! GL.GL_UNSIGNED_BYTE, tex); } } --- 1195,1208 ---- GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! gl.glTexImage2D(GL_TEXTURE_2D, miplevel, GL_COLOR_INDEX8_EXT, scaled_width, ! scaled_height, 0, GL_COLOR_INDEX, ! GL_UNSIGNED_BYTE, paletted_texture); } else { ! tex.clear(); ! tex.put(scaled).flip(); ! gl.glTexImage2D(GL_TEXTURE_2D, miplevel, comp, ! scaled_width, scaled_height, 0, GL_RGBA, ! GL_UNSIGNED_BYTE, tex); } } *************** *** 1222,1233 **** if (mipmap) { ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, gl_filter_min); ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, gl_filter_max); } else { ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, gl_filter_max); ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, gl_filter_max); } --- 1214,1225 ---- if (mipmap) { ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } else { ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } *************** *** 1255,1264 **** if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { ! gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, width, ! height, 0, GL.GL_COLOR_INDEX, GL.GL_UNSIGNED_BYTE, data); ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, gl_filter_max); ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, gl_filter_max); --- 1247,1256 ---- if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { ! gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, width, ! height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, ByteBuffer.wrap(data)); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); *************** *** 1533,1536 **** --- 1525,1530 ---- } + private IntBuffer texnum = Lib.newIntBuffer(1); + /* * ================ GL_FreeUnusedImages *************** *** 1560,1565 **** // free it ! // TODO jogl bug ! gl.glDeleteTextures(1, new int[] { image.texnum }); image.clear(); } --- 1554,1559 ---- // free it ! texnum.put(0, image.texnum); ! gl.glDeleteTextures(texnum); image.clear(); } *************** *** 1662,1667 **** continue; // free image_t slot // free it ! // TODO jogl bug ! gl.glDeleteTextures(1, new int[] { image.texnum }); image.clear(); } --- 1656,1661 ---- continue; // free image_t slot // free it ! texnum.put(0, image.texnum); ! gl.glDeleteTextures(texnum); image.clear(); } Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Main.java,v retrieving revision 1.8 retrieving revision 1.8.6.1 diff -C2 -d -r1.8 -r1.8.6.1 *** Main.java 7 May 2005 18:23:26 -0000 1.8 --- Main.java 16 Jul 2005 18:25:37 -0000 1.8.6.1 *************** *** 30,39 **** import jake2.client.*; import jake2.game.*; - 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.awt.Dimension; --- 30,36 ---- import jake2.client.*; import jake2.game.*; import jake2.qcommon.*; import jake2.render.*; ! import jake2.util.*; import java.awt.Dimension; *************** *** 41,47 **** import java.nio.IntBuffer; - import net.java.games.jogl.GL; - import net.java.games.jogl.Version; - /** * Main --- 38,41 ---- *************** *** 114,120 **** */ - int GL_TEXTURE0 = GL.GL_TEXTURE0; - int GL_TEXTURE1 = GL.GL_TEXTURE1; - model_t r_worldmodel; --- 108,111 ---- *************** *** 147,151 **** float[] r_origin = { 0, 0, 0 }; ! float r_world_matrix[] = new float[16]; float r_base_world_matrix[] = new float[16]; --- 138,142 ---- float[] r_origin = { 0, 0, 0 }; ! FloatBuffer r_world_matrix = Lib.newFloatBuffer(16); float r_base_world_matrix[] = new float[16]; *************** *** 289,293 **** if (alpha != 1.0F) ! gl.glEnable(GL.GL_BLEND); gl.glColor4f(1, 1, 1, alpha); --- 280,284 ---- if (alpha != 1.0F) ! gl.glEnable(GL_BLEND); gl.glColor4f(1, 1, 1, alpha); *************** *** 295,306 **** GL_Bind(currentmodel.skins[e.frame].texnum); ! GL_TexEnv(GL.GL_MODULATE); if (alpha == 1.0) ! gl.glEnable(GL.GL_ALPHA_TEST); else ! gl.glDisable(GL.GL_ALPHA_TEST); ! gl.glBegin(GL.GL_QUADS); gl.glTexCoord2f(0, 1); --- 286,297 ---- GL_Bind(currentmodel.skins[e.frame].texnum); ! GL_TexEnv(GL_MODULATE); if (alpha == 1.0) ! gl.glEnable(GL_ALPHA_TEST); else ! gl.glDisable(GL_ALPHA_TEST); ! gl.glBegin(GL_QUADS); gl.glTexCoord2f(0, 1); *************** *** 326,334 **** gl.glEnd(); ! gl.glDisable(GL.GL_ALPHA_TEST); ! GL_TexEnv(GL.GL_REPLACE); if (alpha != 1.0F) ! gl.glDisable(GL.GL_BLEND); gl.glColor4f(1, 1, 1, 1); --- 317,325 ---- gl.glEnd(); ! gl.glDisable(GL_ALPHA_TEST); ! GL_TexEnv(GL_REPLACE); if (alpha != 1.0F) ! gl.glDisable(GL_BLEND); gl.glColor4f(1, 1, 1, 1); *************** *** 358,369 **** R_RotateForEntity(currententity); ! gl.glDisable(GL.GL_TEXTURE_2D); gl.glColor3f(shadelight[0], shadelight[1], shadelight[2]); ! // this replaces the TRIANGLE_FAN ! glut.glutWireCube(gl, 20); ! /* ! gl.glBegin(GL.GL_TRIANGLE_FAN); gl.glVertex3f(0, 0, -16); int i; --- 349,360 ---- R_RotateForEntity(currententity); ! gl.glDisable(GL_TEXTURE_2D); gl.glColor3f(shadelight[0], shadelight[1], shadelight[2]); ! // // this replaces the TRIANGLE_FAN ! // glut.glutWireCube(gl, 20); ! ! gl.glBegin(GL_TRIANGLE_FAN); gl.glVertex3f(0, 0, -16); int i; *************** *** 373,377 **** gl.glEnd(); ! gl.glBegin(GL.GL_TRIANGLE_FAN); gl.glVertex3f (0, 0, 16); for (i=4 ; i>=0 ; i--) { --- 364,368 ---- gl.glEnd(); ! gl.glBegin(GL_TRIANGLE_FAN); gl.glVertex3f (0, 0, 16); for (i=4 ; i>=0 ; i--) { *************** *** 379,386 **** } gl.glEnd(); ! */ gl.glColor3f(1, 1, 1); gl.glPopMatrix(); ! gl.glEnable(GL.GL_TEXTURE_2D); } --- 370,377 ---- } gl.glEnd(); ! gl.glColor3f(1, 1, 1); gl.glPopMatrix(); ! gl.glEnable(GL_TEXTURE_2D); } *************** *** 481,488 **** GL_Bind(r_particletexture.texnum); gl.glDepthMask(false); // no z buffering ! gl.glEnable(GL.GL_BLEND); ! GL_TexEnv(GL.GL_MODULATE); ! gl.glBegin(GL.GL_TRIANGLES); FloatBuffer sourceVertices = particle_t.vertexArray; --- 472,479 ---- GL_Bind(r_particletexture.texnum); gl.glDepthMask(false); // no z buffering ! gl.glEnable(GL_BLEND); ! GL_TexEnv(GL_MODULATE); ! gl.glBegin(GL_TRIANGLES); FloatBuffer sourceVertices = particle_t.vertexArray; *************** *** 520,527 **** gl.glEnd(); ! gl.glDisable(GL.GL_BLEND); gl.glColor4f(1, 1, 1, 1); gl.glDepthMask(true); // back to normal Z buffering ! GL_TexEnv(GL.GL_REPLACE); } --- 511,518 ---- gl.glEnd(); ! gl.glDisable(GL_BLEND); gl.glColor4f(1, 1, 1, 1); gl.glDepthMask(true); // back to normal Z buffering ! GL_TexEnv(GL_REPLACE); } *************** *** 535,557 **** if (gl_ext_pointparameters.value != 0.0f && qglPointParameterfEXT) { ! gl.glEnableClientState(GL.GL_VERTEX_ARRAY); ! gl.glVertexPointer(3, GL.GL_FLOAT, 0, particle_t.vertexArray); ! gl.glEnableClientState(GL.GL_COLOR_ARRAY); ! gl.glColorPointer(4, GL.GL_UNSIGNED_BYTE, 0, particle_t.colorArray); gl.glDepthMask(false); ! gl.glEnable(GL.GL_BLEND); ! gl.glDisable(GL.GL_TEXTURE_2D); gl.glPointSize(gl_particle_size.value); ! gl.glDrawArrays(GL.GL_POINTS, 0, r_newrefdef.num_particles); ! gl.glDisableClientState(GL.GL_COLOR_ARRAY); ! gl.glDisableClientState(GL.GL_VERTEX_ARRAY); ! gl.glDisable(GL.GL_BLEND); gl.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); gl.glDepthMask(true); ! gl.glEnable(GL.GL_TEXTURE_2D); } --- 526,548 ---- if (gl_ext_pointparameters.value != 0.0f && qglPointParameterfEXT) { ! gl.glEnableClientState(GL_VERTEX_ARRAY); ! gl.glVertexPointer(3, 0, particle_t.vertexArray); ! gl.glEnableClientState(GL_COLOR_ARRAY); ! gl.glColorPointer(4, true, 0, particle_t.getColorAsByteBuffer()); gl.glDepthMask(false); ! gl.glEnable(GL_BLEND); ! gl.glDisable(GL_TEXTURE_2D); gl.glPointSize(gl_particle_size.value); ! gl.glDrawArrays(GL_POINTS, 0, r_newrefdef.num_particles); ! gl.glDisableClientState(GL_COLOR_ARRAY); ! gl.glDisableClientState(GL_VERTEX_ARRAY); ! gl.glDisable(GL_BLEND); gl.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); gl.glDepthMask(true); ! gl.glEnable(GL_TEXTURE_2D); } *************** *** 573,580 **** return; ! gl.glDisable(GL.GL_ALPHA_TEST); ! gl.glEnable(GL.GL_BLEND); ! gl.glDisable(GL.GL_DEPTH_TEST); ! gl.glDisable(GL.GL_TEXTURE_2D); gl.glLoadIdentity(); --- 564,571 ---- return; ! gl.glDisable(GL_ALPHA_TEST); ! gl.glEnable(GL_BLEND); ! gl.glDisable(GL_DEPTH_TEST); ! gl.glDisable(GL_TEXTURE_2D); gl.glLoadIdentity(); *************** *** 586,590 **** gl.glColor4f(v_blend[0], v_blend[1], v_blend[2], v_blend[3]); ! gl.glBegin(GL.GL_QUADS); gl.glVertex3f(10, 100, 100); --- 577,581 ---- gl.glColor4f(v_blend[0], v_blend[1], v_blend[2], v_blend[3]); ! gl.glBegin(GL_QUADS); gl.glVertex3f(10, 100, 100); *************** *** 594,600 **** gl.glEnd(); ! gl.glDisable(GL.GL_BLEND); ! gl.glEnable(GL.GL_TEXTURE_2D); ! gl.glEnable(GL.GL_ALPHA_TEST); gl.glColor4f(1, 1, 1, 1); --- 585,591 ---- gl.glEnd(); ! gl.glDisable(GL_BLEND); ! gl.glEnable(GL_TEXTURE_2D); ! gl.glEnable(GL_ALPHA_TEST); gl.glColor4f(1, 1, 1, 1); *************** *** 684,688 **** // clear out the portion of the screen that the NOWORLDMODEL defines if ((r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) != 0) { ! gl.glEnable(GL.GL_SCISSOR_TEST); gl.glClearColor(0.3f, 0.3f, 0.3f, 1.0f); gl.glScissor( --- 675,679 ---- // clear out the portion of the screen that the NOWORLDMODEL defines if ((r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) != 0) { ! gl.glEnable(GL_SCISSOR_TEST); gl.glClearColor(0.3f, 0.3f, 0.3f, 1.0f); gl.glScissor( *************** *** 691,697 **** r_newrefdef.width, r_newrefdef.height); ! gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); gl.glClearColor(1.0f, 0.0f, 0.5f, 0.5f); ! gl.glDisable(GL.GL_SCISSOR_TEST); } } --- 682,688 ---- r_newrefdef.width, r_newrefdef.height); ! gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); gl.glClearColor(1.0f, 0.0f, 0.5f, 0.5f); ! gl.glDisable(GL_SCISSOR_TEST); } } *************** *** 738,748 **** // screenaspect = (float) r_newrefdef.width / r_newrefdef.height; ! gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); MYgluPerspective(r_newrefdef.fov_y, screenaspect, 4, 4096); ! gl.glCullFace(GL.GL_FRONT); ! gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); --- 729,739 ---- // screenaspect = (float) r_newrefdef.width / r_newrefdef.height; ! gl.glMatrixMode(GL_PROJECTION); gl.glLoadIdentity(); MYgluPerspective(r_newrefdef.fov_y, screenaspect, 4, 4096); ! gl.glCullFace(GL_FRONT); ! gl.glMatrixMode(GL_MODELVIEW); gl.glLoadIdentity(); *************** *** 754,758 **** gl.glTranslatef(-r_newrefdef.vieworg[0], -r_newrefdef.vieworg[1], -r_newrefdef.vieworg[2]); ! gl.glGetFloatv(GL.GL_MODELVIEW_MATRIX, r_world_matrix); // --- 745,750 ---- gl.glTranslatef(-r_newrefdef.vieworg[0], -r_newrefdef.vieworg[1], -r_newrefdef.vieworg[2]); ! gl.glGetFloat(GL_MODELVIEW_MATRIX, r_world_matrix); ! r_world_matrix.clear(); // *************** *** 760,770 **** // if (gl_cull.value != 0.0f) ! gl.glEnable(GL.GL_CULL_FACE); else ! gl.glDisable(GL.GL_CULL_FACE); ! gl.glDisable(GL.GL_BLEND); ! gl.glDisable(GL.GL_ALPHA_TEST); ! gl.glEnable(GL.GL_DEPTH_TEST); } --- 752,762 ---- // if (gl_cull.value != 0.0f) ! gl.glEnable(GL_CULL_FACE); else ! gl.glDisable(GL_CULL_FACE); ! gl.glDisable(GL_BLEND); ! gl.glDisable(GL_ALPHA_TEST); ! gl.glEnable(GL_DEPTH_TEST); } *************** *** 780,784 **** if (gl_clear.value != 0.0f) { ! gl.glClear(GL.GL_COLOR_BUFFER_BIT); } --- 772,776 ---- if (gl_clear.value != 0.0f) { ! gl.glClear(GL_COLOR_BUFFER_BIT); } *************** *** 787,807 **** gldepthmin = 0; gldepthmax = 0.49999f; ! gl.glDepthFunc(GL.GL_LEQUAL); } else { gldepthmin = 1; gldepthmax = 0.5f; ! gl.glDepthFunc(GL.GL_GEQUAL); } } else { if (gl_clear.value != 0.0f) ! gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); else ! gl.glClear(GL.GL_DEPTH_BUFFER_BIT); gldepthmin = 0; gldepthmax = 1; ! gl.glDepthFunc(GL.GL_LEQUAL); } gl.glDepthRange(gldepthmin, gldepthmax); --- 779,799 ---- gldepthmin = 0; gldepthmax = 0.49999f; ! gl.glDepthFunc(GL_LEQUAL); } else { gldepthmin = 1; gldepthmax = 0.5f; ! gl.glDepthFunc(GL_GEQUAL); } } else { if (gl_clear.value != 0.0f) ! gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); else ! gl.glClear(GL_DEPTH_BUFFER_BIT); gldepthmin = 0; gldepthmax = 1; ! gl.glDepthFunc(GL_LEQUAL); } gl.glDepthRange(gldepthmin, gldepthmax); *************** *** 875,887 **** // set 2D virtual screen size gl.glViewport(0, 0, vid.width, vid.height); ! gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); gl.glOrtho(0, vid.width, vid.height, 0, -99999, 99999); ! gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); ! gl.glDisable(GL.GL_DEPTH_TEST); ! gl.glDisable(GL.GL_CULL_FACE); ! gl.glDisable(GL.GL_BLEND); ! gl.glEnable(GL.GL_ALPHA_TEST); gl.glColor4f(1, 1, 1, 1); } --- 867,879 ---- // set 2D virtual screen size gl.glViewport(0, 0, vid.width, vid.height); ! gl.glMatrixMode(GL_PROJECTION); gl.glLoadIdentity(); gl.glOrtho(0, vid.width, vid.height, 0, -99999, 99999); ! gl.glMatrixMode(GL_MODELVIEW); gl.glLoadIdentity(); ! gl.glDisable(GL_DEPTH_TEST); ! gl.glDisable(GL_CULL_FACE); ! gl.glDisable(GL_BLEND); ! gl.glEnable(GL_ALPHA_TEST); gl.glColor4f(1, 1, 1, 1); } *************** *** 1106,1121 **** protected boolean R_Init2() { VID.MenuInit(); ! /* ** get our various GL strings */ ! VID.Printf(Defines.PRINT_ALL, "JOGL_VERSION: " + Version.getVersion() + '\n'); ! gl_config.vendor_string = gl.glGetString(GL.GL_VENDOR); VID.Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); ! gl_config.renderer_string = gl.glGetString(GL.GL_RENDERER); VID.Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); ! gl_config.version_string = gl.glGetString(GL.GL_VERSION); VID.Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); ! gl_config.extensions_string = gl.glGetString(GL.GL_EXTENSIONS); VID.Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); --- 1098,1113 ---- protected boolean R_Init2() { VID.MenuInit(); ! /* ** get our various GL strings */ ! // VID.Printf(Defines.PRINT_ALL, "JOGL_VERSION: " + Version.getVersion() + '\n'); ! gl_config.vendor_string = gl.glGetString(GL_VENDOR); VID.Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); ! gl_config.renderer_string = gl.glGetString(GL_RENDERER); VID.Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); ! gl_config.version_string = gl.glGetString(GL_VERSION); VID.Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); ! gl_config.extensions_string = gl.glGetString(GL_EXTENSIONS); VID.Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); *************** *** 1280,1285 **** qglActiveTextureARB = true; qglMTexCoord2fSGIS = true; ! GL_TEXTURE0 = GL.GL_TEXTURE0_ARB; ! GL_TEXTURE1 = GL.GL_TEXTURE1_ARB; Cvar.SetValue("r_fullbright", 1); } --- 1272,1277 ---- qglActiveTextureARB = true; qglMTexCoord2fSGIS = true; ! // GL_TEXTURE0 = GL_TEXTURE0_ARB; ! // GL_TEXTURE1 = GL_TEXTURE1_ARB; Cvar.SetValue("r_fullbright", 1); } *************** *** 1305,1310 **** qglMTexCoord2fSGIS = true; Cvar.SetValue("r_fullbright", 1); ! // //GL_TEXTURE0 = GL.GL_TEXTURE0_SGIS; ! // //GL_TEXTURE1 = GL.GL_TEXTURE1_SGIS; } else { VID.Printf(Defines.PRINT_ALL, "...ignoring GL_SGIS_multitexture\n"); --- 1297,1302 ---- qglMTexCoord2fSGIS = true; Cvar.SetValue("r_fullbright", 1); ! // //GL_TEXTURE0 = GL_TEXTURE0_SGIS; ! // //GL_TEXTURE1 = GL_TEXTURE1_SGIS; } else { VID.Printf(Defines.PRINT_ALL, "...ignoring GL_SGIS_multitexture\n"); *************** *** 1326,1330 **** int err = gl.glGetError(); ! if (err != GL.GL_NO_ERROR) VID.Printf( Defines.PRINT_ALL, --- 1318,1322 ---- int err = gl.glGetError(); ! if (err != GL_NO_ERROR) VID.Printf( Defines.PRINT_ALL, *************** *** 1372,1376 **** cvar_t ref; ! ref = Cvar.Get("vid_ref", "jogl", 0); ref.modified = true; } --- 1364,1368 ---- cvar_t ref; ! ref = Cvar.Get("vid_ref", "lwjgl", 0); ref.modified = true; } *************** *** 1415,1427 **** */ gl.glViewport(0, 0, vid.width, vid.height); ! gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); gl.glOrtho(0, vid.width, vid.height, 0, -99999, 99999); ! gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); ! gl.glDisable(GL.GL_DEPTH_TEST); ! gl.glDisable(GL.GL_CULL_FACE); ! gl.glDisable(GL.GL_BLEND); ! gl.glEnable(GL.GL_ALPHA_TEST); gl.glColor4f(1, 1, 1, 1); --- 1407,1419 ---- */ gl.glViewport(0, 0, vid.width, vid.height); ! gl.glMatrixMode(GL_PROJECTION); gl.glLoadIdentity(); gl.glOrtho(0, vid.width, vid.height, 0, -99999, 99999); ! gl.glMatrixMode(GL_MODELVIEW); gl.glLoadIdentity(); ! gl.glDisable(GL_DEPTH_TEST); ! gl.glDisable(GL_CULL_FACE); ! gl.glDisable(GL_BLEND); ! gl.glEnable(GL_ALPHA_TEST); gl.glColor4f(1, 1, 1, 1); *************** *** 1434,1440 **** if (gl_state.camera_separation == 0 || !gl_state.stereo_enabled) { if (gl_drawbuffer.string.equalsIgnoreCase("GL_FRONT")) ! gl.glDrawBuffer(GL.GL_FRONT); else ! gl.glDrawBuffer(GL.GL_BACK); } } --- 1426,1432 ---- if (gl_state.camera_separation == 0 || !gl_state.stereo_enabled) { if (gl_drawbuffer.string.equalsIgnoreCase("GL_FRONT")) ! gl.glDrawBuffer(GL_FRONT); else ! gl.glDrawBuffer(GL_BACK); } } *************** *** 1500,1504 **** gl.glClearColor(0, 0, 0, 0); ! gl.glClear(GL.GL_COLOR_BUFFER_BIT); gl.glClearColor(1f, 0f, 0.5f, 0.5f); } --- 1492,1496 ---- gl.glClearColor(0, 0, 0, 0); ! gl.glClear(GL_COLOR_BUFFER_BIT); gl.glClearColor(1f, 0f, 0.5f, 0.5f); } *************** *** 1553,1558 **** } ! gl.glDisable(GL.GL_TEXTURE_2D); ! gl.glEnable(GL.GL_BLEND); gl.glDepthMask(false); --- 1545,1550 ---- } ! gl.glDisable(GL_TEXTURE_2D); ! gl.glEnable(GL_BLEND); gl.glDepthMask(false); *************** *** 1567,1571 **** gl.glColor4f(r, g, b, e.alpha); ! gl.glBegin(GL.GL_TRIANGLE_STRIP); float[] v; --- 1559,1563 ---- gl.glColor4f(r, g, b, e.alpha); ! gl.glBegin(GL_TRIANGLE_STRIP); float[] v; *************** *** 1583,1588 **** gl.glEnd(); ! gl.glEnable(GL.GL_TEXTURE_2D); ! gl.glDisable(GL.GL_BLEND); gl.glDepthMask(true); } --- 1575,1580 ---- gl.glEnd(); ! gl.glEnable(GL_TEXTURE_2D); ! gl.glDisable(GL_BLEND); gl.glDepthMask(true); } Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Surf.java,v retrieving revision 1.6 retrieving revision 1.6.6.1 diff -C2 -d -r1.6 -r1.6.6.1 *** Surf.java 9 Jan 2005 22:34:21 -0000 1.6 --- Surf.java 16 Jul 2005 18:25:37 -0000 1.6.6.1 *************** *** 38,43 **** import java.util.Arrays; - import net.java.games.jogl.GL; - /** * Surf --- 38,41 ---- *************** *** 65,69 **** int c_visible_textures; ! static final int GL_LIGHTMAP_FORMAT = GL.GL_RGBA; static class gllightmapstate_t --- 63,67 ---- int c_visible_textures; ! static final int GL_LIGHTMAP_FORMAT = GL_RGBA; static class gllightmapstate_t *************** *** 155,159 **** void DrawGLPoly(glpoly_t p) { ! gl.glBegin(GL.GL_POLYGON); for (int i=0 ; i<p.numverts ; i++) { --- 153,157 ---- void DrawGLPoly(glpoly_t p) { ! gl.glBegin(GL_POLYGON); for (int i=0 ; i<p.numverts ; i++) { *************** *** 177,181 **** scroll = -64.0f; ! gl.glBegin (GL.GL_POLYGON); glpoly_t p = fa.polys; for (int i=0 ; i<p.numverts ; i++) --- 175,179 ---- scroll = -64.0f; ! gl.glBegin (GL_POLYGON); glpoly_t p = fa.polys; for (int i=0 ; i<p.numverts ; i++) *************** *** 197,202 **** return; ! gl.glDisable (GL.GL_TEXTURE_2D); ! gl.glDisable (GL.GL_DEPTH_TEST); gl.glColor4f (1,1,1,1); --- 195,200 ---- return; ! gl.glDisable (GL_TEXTURE_2D); ! gl.glDisable (GL_DEPTH_TEST); gl.glColor4f (1,1,1,1); *************** *** 212,216 **** for (int j=2 ; j<p.numverts ; j++ ) { ! gl.glBegin (GL.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)); --- 210,214 ---- for (int j=2 ; j<p.numverts ; j++ ) { ! gl.glBegin (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)); *************** *** 222,227 **** } } ! gl.glEnable (GL.GL_DEPTH_TEST); ! gl.glEnable (GL.GL_TEXTURE_2D); } --- 220,225 ---- } } ! gl.glEnable (GL_DEPTH_TEST); ! gl.glEnable (GL_TEXTURE_2D); } *************** *** 235,239 **** for ( ; p != null; p = p.chain ) { ! gl.glBegin(GL.GL_POLYGON); for (int j=0 ; j<p.numverts ; j++) { --- 233,237 ---- for ( ; p != null; p = p.chain ) { ! gl.glBegin(GL_POLYGON); for (int j=0 ; j<p.numverts ; j++) { *************** *** 248,252 **** for ( ; p != null; p = p.chain ) { ! gl.glBegin(GL.GL_POLYGON); for (int j=0 ; j<p.numverts ; j++) { --- 246,250 ---- for ( ; p != null; p = p.chain ) { ! gl.glBegin(GL_POLYGON); for (int j=0 ; j<p.numverts ; j++) { *************** *** 286,294 **** if (gl_lightmap.value == 0) { ! gl.glEnable(GL.GL_BLEND); if ( gl_saturatelighting.value != 0) { ! gl.glBlendFunc( GL.GL_ONE, GL.GL_ONE ); } else --- 284,292 ---- if (gl_lightmap.value == 0) { ! gl.glEnable(GL_BLEND); if ( gl_saturatelighting.value != 0) { ! gl.glBlendFunc( GL_ONE, GL_ONE ); } else *************** *** 300,311 **** { case 'I': ! gl.glBlendFunc(GL.GL_ZERO, GL.GL_SRC_COLOR ); break; case 'L': ! gl.glBlendFunc(GL.GL_ZERO, GL.GL_SRC_COLOR ); break; case 'A': default: ! gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA ); break; } --- 298,309 ---- { case 'I': ! gl.glBlendFunc(GL_ZERO, GL_SRC_COLOR ); break; case 'L': ! gl.glBlendFunc(GL_ZERO, GL_SRC_COLOR ); break; case 'A': default: ! gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); break; } *************** *** 313,317 **** else { ! gl.glBlendFunc(GL.GL_ZERO, GL.GL_SRC_COLOR ); } } --- 311,315 ---- else { ! gl.glBlendFunc(GL_ZERO, GL_SRC_COLOR ); } } *************** *** 433,438 **** ** restore state */ ! gl.glDisable(GL.GL_BLEND); ! gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); gl.glDepthMask( true ); } --- 431,436 ---- ** restore state */ ! gl.glDisable(GL_BLEND); ! gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); gl.glDepthMask( true ); } *************** *** 460,464 **** // warp texture, no lightmaps ! GL_TexEnv( GL.GL_MODULATE ); gl.glColor4f( gl_state.inverse_intensity, gl_state.inverse_intensity, --- 458,462 ---- // warp texture, no lightmaps ! GL_TexEnv( GL_MODULATE ); gl.glColor4f( gl_state.inverse_intensity, gl_state.inverse_intensity, *************** *** 466,470 **** 1.0F ); EmitWaterPolys (fa); ! GL_TexEnv( GL.GL_REPLACE ); return; --- 464,468 ---- 1.0F ); EmitWaterPolys (fa); ! GL_TexEnv( GL_REPLACE ); return; *************** *** 473,477 **** { GL_Bind( image.texnum ); ! GL_TexEnv( GL.GL_REPLACE ); } --- 471,475 ---- { GL_Bind( image.texnum ); ! GL_TexEnv( GL_REPLACE ); } *************** *** 529,537 **** GL_Bind( gl_state.lightmap_textures + fa.lightmaptexturenum ); ! gl.glTexSubImage2D( GL.GL_TEXTURE_2D, 0, fa.light_s, fa.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL.GL_UNSIGNED_BYTE, temp2 ); fa.lightmapchain = gl_lms.lightmap_surfaces[fa.lightmaptexturenum]; --- 527,535 ---- GL_Bind( gl_state.lightmap_textures + fa.lightmaptexturenum ); ! gl.glTexSubImage2D( GL_TEXTURE_2D, 0, fa.light_s, fa.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, temp2 ); fa.lightmapchain = gl_lms.lightmap_surfaces[fa.lightmaptexturenum]; *************** *** 569,576 **** // go back to the world matrix // ! gl.glLoadMatrixf(r_world_matrix); ! gl.glEnable (GL.GL_BLEND); ! GL_TexEnv(GL.GL_MODULATE ); // the textures are prescaled up for a better lighting range, --- 567,575 ---- // go back to the world matrix // ! r_world_matrix.clear(); ! gl.glLoadMatrix(r_world_matrix); ! gl.glEnable (GL_BLEND); ! GL_TexEnv(GL_MODULATE ); // the textures are prescaled up for a better lighting range, *************** *** 596,602 **** } ! GL_TexEnv( GL.GL_REPLACE ); gl.glColor4f (1,1,1,1); ! gl.glDisable (GL.GL_BLEND); r_alpha_surfaces = null; --- 595,601 ---- } ! GL_TexEnv( GL_REPLACE ); gl.glColor4f (1,1,1,1); ! gl.glDisable (GL_BLEND); r_alpha_surfaces = null; *************** *** 675,679 **** } ! GL_TexEnv( GL.GL_REPLACE ); } --- 674,678 ---- } ! GL_TexEnv( GL_REPLACE ); } *************** *** 735,743 **** lmtex = surf.lightmaptexturenum; ! gl.glTexSubImage2D( GL.GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL.GL_UNSIGNED_BYTE, temp ); } --- 734,742 ---- lmtex = surf.lightmaptexturenum; ! gl.glTexSubImage2D( GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, temp ); } *************** *** 753,761 **** lmtex = 0; ! gl.glTexSubImage2D( GL.GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL.GL_UNSIGNED_BYTE, temp ); } --- 752,760 ---- lmtex = 0; ! gl.glTexSubImage2D( GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, temp ); } *************** *** 778,786 **** for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glBegin (GL.GL_POLYGON); for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, p.s1(i) + scroll, p.t1(i)); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3] + scroll, v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); --- 777,785 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glBegin (GL_POLYGON); for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2f(GL_TEXTURE0, p.s1(i) + scroll, p.t1(i)); ! gl.glMultiTexCoord2f(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3] + scroll, v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); *************** *** 794,802 **** for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glBegin (GL.GL_POLYGON); for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, p.s1(i), p.t1(i)); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); --- 793,801 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glBegin (GL_POLYGON); for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2f(GL_TEXTURE0, p.s1(i), p.t1(i)); ! gl.glMultiTexCoord2f(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); *************** *** 828,836 **** for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glBegin(GL.GL_POLYGON); for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, p.s1(i) + scroll, p.t1(i)); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3] + scroll, v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); --- 827,835 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glBegin(GL_POLYGON); for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2f(GL_TEXTURE0, p.s1(i) + scroll, p.t1(i)); ! gl.glMultiTexCoord2f(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3] + scroll, v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); *************** *** 846,854 **** for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glBegin (GL.GL_POLYGON); for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, p.s1(i), p.t1(i)); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); --- 845,853 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glBegin (GL_POLYGON); for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2f(GL_TEXTURE0, p.s1(i), p.t1(i)); ! gl.glMultiTexCoord2f(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); *************** *** 896,902 **** if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! gl.glEnable (GL.GL_BLEND); gl.glColor4f (1,1,1,0.25f); ! GL_TexEnv( GL.GL_MODULATE ); } --- 895,901 ---- if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! gl.glEnable (GL_BLEND); gl.glColor4f (1,1,1,0.25f); ! GL_TexEnv( GL_MODULATE ); } *************** *** 941,947 **** else { ! gl.glDisable (GL.GL_BLEND); gl.glColor4f (1,1,1,1); ! GL_TexEnv( GL.GL_REPLACE ); } } --- 940,946 ---- else { ! gl.glDisable (GL_BLEND); gl.glColor4f (1,1,1,1); ! GL_TexEnv( GL_REPLACE ); } } *************** *** 1018,1024 **** GL_EnableMultitexture( true ); GL_SelectTexture(GL_TEXTURE0); ! GL_TexEnv( GL.GL_REPLACE ); GL_SelectTexture(GL_TEXTURE1); ! GL_TexEnv( GL.GL_MODULATE ); R_DrawInlineBModel(); --- 1017,1023 ---- GL_EnableMultitexture( true ); GL_SelectTexture(GL_TEXTURE0); ! GL_TexEnv( GL_REPLACE ); GL_SelectTexture(GL_TEXTURE1); ! GL_TexEnv( GL_MODULATE ); R_DrawInlineBModel(); *************** *** 1202,1212 **** GL_SelectTexture( GL_TEXTURE0); ! GL_TexEnv( GL.GL_REPLACE ); GL_SelectTexture( GL_TEXTURE1); if ( gl_lightmap.value != 0) ! GL_TexEnv( GL.GL_REPLACE ); else ! GL_TexEnv( GL.GL_MODULATE ); R_RecursiveWorldNode(r_worldmodel.nodes[0]); // root node --- 1201,1211 ---- GL_SelectTexture( GL_TEXTURE0); ! GL_TexEnv( GL_REPLACE ); GL_SelectTexture( GL_TEXTURE1); if ( gl_lightmap.value != 0) ! GL_TexEnv( GL_REPLACE ); else ! GL_TexEnv( GL_MODULATE ); R_RecursiveWorldNode(r_worldmodel.nodes[0]); // root node *************** *** 1344,1350 **** GL_Bind( gl_state.lightmap_textures + texture ); ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR); ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR); if ( dynamic ) { --- 1343,1350 ---- GL_Bind( gl_state.lightmap_textures + texture ); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + gl_lms.lightmap_buffer.rewind(); if ( dynamic ) { *************** *** 1357,1371 **** } ! gl.glTexSubImage2D( GL.GL_TEXTURE_2D, 0, 0, 0, BLOCK_WIDTH, height, GL_LIGHTMAP_FORMAT, ! GL.GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer ); } else { ! gl.glTexImage2D( GL.GL_TEXTURE_2D, 0, gl_lms.internal_format, --- 1357,1371 ---- } ! gl.glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, BLOCK_WIDTH, height, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer ); } else { ! gl.glTexImage2D( GL_TEXTURE_2D, 0, gl_lms.internal_format, *************** *** 1373,1377 **** 0, GL_LIGHTMAP_FORMAT, ! GL.GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) --- 1373,1377 ---- 0, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) *************** *** 1550,1554 **** lightstyle_t[] lightstyles; ! /* ================== --- 1550,1554 ---- lightstyle_t[] lightstyles; ! private final IntBuffer dummy = Lib.newIntBuffer(128*128); /* ================== *************** *** 1561,1566 **** // static lightstyle_t lightstyles[MAX_LIGHTSTYLES]; int i; - int[] dummy = new int[128*128]; - // init lightstyles if ( lightstyles == null ) { --- 1561,1564 ---- *************** *** 1629,1637 **** else if ( format == 'I' ) { ! gl_lms.internal_format = GL.GL_INTENSITY8; } else if ( format == 'L' ) { ! gl_lms.internal_format = GL.GL_LUMINANCE8; } else --- 1627,1635 ---- else if ( format == 'I' ) { ! gl_lms.internal_format = GL_INTENSITY8; } else if ( format == 'L' ) { ! gl_lms.internal_format = GL_LUMINANCE8; } else *************** *** 1644,1650 **** */ GL_Bind( gl_state.lightmap_textures + 0 ); ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR); ! gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR); ! gl.glTexImage2D( GL.GL_TEXTURE_2D, 0, gl_lms.internal_format, --- 1642,1648 ---- */ GL_Bind( gl_state.lightmap_textures + 0 ); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ! gl.glTexImage2D( GL_TEXTURE_2D, 0, gl_lms.internal_format, *************** *** 1652,1656 **** 0, GL_LIGHTMAP_FORMAT, ! GL.GL_UNSIGNED_BYTE, dummy ); } --- 1650,1654 ---- 0, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, dummy ); } Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Light.java,v retrieving revision 1.7 retrieving revision 1.7.12.1 diff -C2 -d -r1.7 -r1.7.12.1 *** Light.java 22 Sep 2004 19:22:16 -0000 1.7 --- Light.java 16 Jul 2005 18:25:37 -0000 1.7.12.1 *************** *** 42,47 **** import java.util.Arrays; - import net.java.games.jogl.GL; - /** * Light --- 42,45 ---- *************** *** 74,78 **** Math3D.VectorSubtract(light.origin, r_origin, v); ! gl.glBegin(GL.GL_TRIANGLE_FAN); gl.glColor3f(light.color[0] * 0.2f, light.color[1] * 0.2f, light.color[2] * 0.2f); --- 72,76 ---- Math3D.VectorSubtract(light.origin, r_origin, v); ! gl.glBegin(GL_TRIANGLE_FAN); gl.glColor3f(light.color[0] * 0.2f, light.color[1] * 0.2f, light.color[2] * 0.2f); *************** *** 104,111 **** // advanced yet for this frame gl.glDepthMask(false); ! gl.glDisable(GL.GL_TEXTURE_2D); ! gl.glShadeModel(GL.GL_SMOOTH); ! gl.glEnable(GL.GL_BLEND); ! gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE); for (i = 0; i < r_newrefdef.num_dlights; i++) { --- 102,109 ---- // advanced yet for this frame gl.glDepthMask(false); ! gl.glDisable(GL_TEXTURE_2D); ! gl.glShadeModel(GL_SMOOTH); ! gl.glEnable(GL_BLEND); ! gl.glBlendFunc(GL_ONE, GL_ONE); for (i = 0; i < r_newrefdef.num_dlights; i++) { *************** *** 115,121 **** gl.glColor3f(1, 1, 1); ! gl.glDisable(GL.GL_BLEND); ! gl.glEnable(GL.GL_TEXTURE_2D); ! gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); gl.glDepthMask(true); } --- 113,119 ---- gl.glColor3f(1, 1, 1); ! gl.glDisable(GL_BLEND); ! gl.glEnable(GL_TEXTURE_2D); ! gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); gl.glDepthMask(true); } *************** *** 593,599 **** if (monolightmap == '0') { for (i = 0; i < tmax; i++, destp += stride) { ! dest.position(destp); ! ! for (j = 0; j < smax; j++) { r = (int) bl[blp++]; --- 591,595 ---- if (monolightmap == '0') { for (i = 0; i < tmax; i++, destp += stride) { ! for (j = 0; j < smax; j++, destp++) { r = (int) bl[blp++]; *************** *** 642,646 **** b &= 0xFF; a &= 0xFF; ! dest.put(destp++, (a << 24) | (b << 16) | (g << 8) | (r << 0)); } --- 638,642 ---- b &= 0xFF; a &= 0xFF; ! dest.put(destp, (a << 24) | (b << 16) | (g << 8) | (r << 0)); } *************** *** 648,654 **** } else { for (i = 0; i < tmax; i++, destp += stride) { ! dest.position(destp); ! ! for (j = 0; j < smax; j++) { r = (int) bl[blp++]; --- 644,648 ---- } else { for (i = 0; i < tmax; i++, destp += stride) { ! for (j = 0; j < smax; j++, destp++) { r = (int) bl[blp++]; *************** *** 722,726 **** b &= 0xFF; a &= 0xFF; ! dest.put(destp++, (a << 24) | (b << 16) | (g << 8) | (r << 0)); } --- 716,720 ---- b &= 0xFF; a &= 0xFF; ! dest.put(destp, (a << 24) | (b << 16) | (g << 8) | (r << 0)); } Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Warp.java,v retrieving revision 1.9 retrieving revision 1.9.6.1 diff -C2 -d -r1.9 -r1.9.6.1 *** Warp.java 10 Jan 2005 00:05:23 -0000 1.9 --- Warp.java 16 Jul 2005 18:25:37 -0000 1.9.6.1 *************** *** 31,35 **** import jake2.render.*; import jake2.util.Math3D; - import net.java.games.jogl.GL; /** --- 31,34 ---- *************** *** 294,298 **** p = bp; ! gl.glBegin(GL.GL_TRIANGLE_FAN); for (i = 0; i < p.numverts; i++) { os = p.s1(i); --- 293,297 ---- p = bp; ! gl.glBegin(GL_TRIANGLE_FAN); for (i = 0; i < p.numverts; i++) { ... [truncated message content] |
From: Carsten W. <ca...@us...> - 2005-07-16 18:22:46
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10102/src/jake2/render/lwjgl Modified Files: Tag: render-refactoring Main.java Draw.java Warp.java Light.java Misc.java Surf.java LWJGLBase.java Mesh.java Image.java Base.java Log Message: gl call delegation Index: Base.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Base.java,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -C2 -d -r1.4.4.1 -r1.4.4.2 *** Base.java 10 Jul 2005 17:55:51 -0000 1.4.4.1 --- Base.java 16 Jul 2005 18:22:37 -0000 1.4.4.2 *************** *** 28,32 **** import jake2.client.viddef_t; import jake2.game.cvar_t; ! import jake2.render.QGL; import java.awt.Dimension; --- 28,32 ---- import jake2.client.viddef_t; import jake2.game.cvar_t; ! import jake2.render.*; import java.awt.Dimension; *************** *** 37,41 **** * @author dsanders/cwei */ ! public abstract class Base extends QGL { static final int GL_COLOR_INDEX8_EXT = GL_COLOR_INDEX; --- 37,41 ---- * @author dsanders/cwei */ ! public abstract class Base implements QGLConst { static final int GL_COLOR_INDEX8_EXT = GL_COLOR_INDEX; *************** *** 164,167 **** --- 164,169 ---- protected cvar_t vid_fullscreen; + + protected QGL gl = LwjglGL.getInstance(); //DummyGL.getInstance(); // enum rserr_t Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Image.java,v retrieving revision 1.3.6.1 retrieving revision 1.3.6.2 diff -C2 -d -r1.3.6.1 -r1.3.6.2 *** Image.java 10 Jul 2005 17:55:51 -0000 1.3.6.1 --- Image.java 16 Jul 2005 18:22:37 -0000 1.3.6.2 *************** *** 100,104 **** } ! glColorTable(GL_SHARED_TEXTURE_PALETTE_EXT, GL_RGB, 256, GL_RGB, GL_UNSIGNED_BYTE, temptable); } } --- 100,104 ---- } ! gl.glColorTable(GL_SHARED_TEXTURE_PALETTE_EXT, GL_RGB, 256, GL_RGB, GL_UNSIGNED_BYTE, temptable); } } *************** *** 107,116 **** if (enable) { GL_SelectTexture(TEXTURE1); ! glEnable(GL_TEXTURE_2D); GL_TexEnv(GL_REPLACE); } else { GL_SelectTexture(TEXTURE1); ! glDisable(GL_TEXTURE_2D); GL_TexEnv(GL_REPLACE); } --- 107,116 ---- if (enable) { GL_SelectTexture(TEXTURE1); ! gl.glEnable(GL_TEXTURE_2D); GL_TexEnv(GL_REPLACE); } else { GL_SelectTexture(TEXTURE1); ! gl.glDisable(GL_TEXTURE_2D); GL_TexEnv(GL_REPLACE); } *************** *** 130,135 **** gl_state.currenttmu = tmu; ! glActiveTextureARB(texture); ! glClientActiveTextureARB(texture); } --- 130,135 ---- gl_state.currenttmu = tmu; ! gl.glActiveTextureARB(texture); ! gl.glClientActiveTextureARB(texture); } *************** *** 140,144 **** if (mode != lastmodes[gl_state.currenttmu]) { ! glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode); lastmodes[gl_state.currenttmu] = mode; } --- 140,144 ---- if (mode != lastmodes[gl_state.currenttmu]) { ! gl.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode); lastmodes[gl_state.currenttmu] = mode; } *************** *** 155,159 **** gl_state.currenttextures[gl_state.currenttmu] = texnum; ! glBindTexture(GL_TEXTURE_2D, texnum); } --- 155,159 ---- gl_state.currenttextures[gl_state.currenttmu] = texnum; ! gl.glBindTexture(GL_TEXTURE_2D, texnum); } *************** *** 225,231 **** new gltmode_t("GL_RGB4", GL_RGB4), new gltmode_t("GL_R3_G3_B2", GL_R3_G3_B2), - // #ifdef GL_RGB2_EXT - //new gltmode_t("GL_RGB2", GL.GL_RGB2_EXT) - // #endif }; --- 225,228 ---- *************** *** 260,265 **** if (glt.type != it_pic && glt.type != it_sky) { GL_Bind(glt.texnum); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } } --- 257,262 ---- if (glt.type != it_pic && glt.type != it_sky) { GL_Bind(glt.texnum); ! gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); ! gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } } *************** *** 1124,1128 **** uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, data, scaled_width, scaled_height); ! glTexImage2D( GL_TEXTURE_2D, 0, --- 1121,1125 ---- uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, data, scaled_width, scaled_height); ! gl.glTexImage2D( GL_TEXTURE_2D, 0, *************** *** 1137,1141 **** else { tex.rewind(); tex.put(data); tex.rewind(); ! glTexImage2D( GL_TEXTURE_2D, 0, --- 1134,1138 ---- else { tex.rewind(); tex.put(data); tex.rewind(); ! gl.glTexImage2D( GL_TEXTURE_2D, 0, *************** *** 1162,1166 **** uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! glTexImage2D( GL_TEXTURE_2D, 0, --- 1159,1163 ---- uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! gl.glTexImage2D( GL_TEXTURE_2D, 0, *************** *** 1175,1179 **** else { tex.rewind(); tex.put(scaled); tex.rewind(); ! glTexImage2D(GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex); } --- 1172,1176 ---- else { tex.rewind(); tex.put(scaled); tex.rewind(); ! gl.glTexImage2D(GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex); } *************** *** 1194,1198 **** uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! glTexImage2D( GL_TEXTURE_2D, miplevel, --- 1191,1195 ---- uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! gl.glTexImage2D( GL_TEXTURE_2D, miplevel, *************** *** 1207,1211 **** else { tex.rewind(); tex.put(scaled); tex.rewind(); ! glTexImage2D( GL_TEXTURE_2D, miplevel, --- 1204,1208 ---- else { tex.rewind(); tex.put(scaled); tex.rewind(); ! gl.glTexImage2D( GL_TEXTURE_2D, miplevel, *************** *** 1227,1236 **** if (mipmap) { ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } else { ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } --- 1224,1233 ---- if (mipmap) { ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } else { ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } *************** *** 1258,1265 **** if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { ! glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, width, height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, ByteBuffer.wrap(data)); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); // TODO check this --- 1255,1262 ---- if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { ! gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, width, height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, ByteBuffer.wrap(data)); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); // TODO check this *************** *** 1570,1574 **** texnumBuffer.clear(); texnumBuffer.put(0,image.texnum); ! glDeleteTextures(texnumBuffer); image.clear(); } --- 1567,1571 ---- texnumBuffer.clear(); texnumBuffer.put(0,image.texnum); ! gl.glDeleteTextures(texnumBuffer); image.clear(); } *************** *** 1680,1684 **** texnumBuffer.clear(); texnumBuffer.put(0,image.texnum); ! glDeleteTextures(texnumBuffer); image.clear(); } --- 1677,1681 ---- texnumBuffer.clear(); texnumBuffer.put(0,image.texnum); ! gl.glDeleteTextures(texnumBuffer); image.clear(); } Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Main.java,v retrieving revision 1.7.6.1 retrieving revision 1.7.6.2 diff -C2 -d -r1.7.6.1 -r1.7.6.2 *** Main.java 10 Jul 2005 17:55:50 -0000 1.7.6.1 --- Main.java 16 Jul 2005 18:22:36 -0000 1.7.6.2 *************** *** 241,249 **** */ final void R_RotateForEntity(entity_t e) { ! glTranslatef(e.origin[0], e.origin[1], e.origin[2]); ! glRotatef(e.angles[1], 0, 0, 1); ! glRotatef(-e.angles[0], 0, 1, 0); ! glRotatef(-e.angles[2], 1, 0, 0); } --- 241,249 ---- */ final void R_RotateForEntity(entity_t e) { ! gl.glTranslatef(e.origin[0], e.origin[1], e.origin[2]); ! gl.glRotatef(e.angles[1], 0, 0, 1); ! gl.glRotatef(-e.angles[0], 0, 1, 0); ! gl.glRotatef(-e.angles[2], 1, 0, 0); } *************** *** 280,286 **** if (alpha != 1.0F) ! glEnable(GL_BLEND); ! glColor4f(1, 1, 1, alpha); GL_Bind(currentmodel.skins[e.frame].texnum); --- 280,286 ---- if (alpha != 1.0F) ! gl.glEnable(GL_BLEND); ! gl.glColor4f(1, 1, 1, alpha); GL_Bind(currentmodel.skins[e.frame].texnum); *************** *** 289,327 **** if (alpha == 1.0) ! glEnable(GL_ALPHA_TEST); else ! glDisable(GL_ALPHA_TEST); ! glBegin(GL_QUADS); ! glTexCoord2f(0, 1); Math3D.VectorMA(e.origin, -frame.origin_y, vup, point); Math3D.VectorMA(point, -frame.origin_x, vright, point); ! glVertex3f(point[0], point[1], point[2]); ! glTexCoord2f(0, 0); Math3D.VectorMA(e.origin, frame.height - frame.origin_y, vup, point); Math3D.VectorMA(point, -frame.origin_x, vright, point); ! glVertex3f(point[0], point[1], point[2]); ! glTexCoord2f(1, 0); Math3D.VectorMA(e.origin, frame.height - frame.origin_y, vup, point); Math3D.VectorMA(point, frame.width - frame.origin_x, vright, point); ! glVertex3f(point[0], point[1], point[2]); ! glTexCoord2f(1, 1); Math3D.VectorMA(e.origin, -frame.origin_y, vup, point); Math3D.VectorMA(point, frame.width - frame.origin_x, vright, point); ! glVertex3f(point[0], point[1], point[2]); ! glEnd(); ! glDisable(GL_ALPHA_TEST); GL_TexEnv(GL_REPLACE); if (alpha != 1.0F) ! glDisable(GL_BLEND); ! glColor4f(1, 1, 1, 1); } --- 289,327 ---- if (alpha == 1.0) ! gl.glEnable(GL_ALPHA_TEST); else ! gl.glDisable(GL_ALPHA_TEST); ! gl.glBegin(GL_QUADS); ! gl.glTexCoord2f(0, 1); Math3D.VectorMA(e.origin, -frame.origin_y, vup, point); Math3D.VectorMA(point, -frame.origin_x, vright, point); ! gl.glVertex3f(point[0], point[1], point[2]); ! gl.glTexCoord2f(0, 0); Math3D.VectorMA(e.origin, frame.height - frame.origin_y, vup, point); Math3D.VectorMA(point, -frame.origin_x, vright, point); ! gl.glVertex3f(point[0], point[1], point[2]); ! gl.glTexCoord2f(1, 0); Math3D.VectorMA(e.origin, frame.height - frame.origin_y, vup, point); Math3D.VectorMA(point, frame.width - frame.origin_x, vright, point); ! gl.glVertex3f(point[0], point[1], point[2]); ! gl.glTexCoord2f(1, 1); Math3D.VectorMA(e.origin, -frame.origin_y, vup, point); Math3D.VectorMA(point, frame.width - frame.origin_x, vright, point); ! gl.glVertex3f(point[0], point[1], point[2]); ! gl.glEnd(); ! gl.glDisable(GL_ALPHA_TEST); GL_TexEnv(GL_REPLACE); if (alpha != 1.0F) ! gl.glDisable(GL_BLEND); ! gl.glColor4f(1, 1, 1, 1); } *************** *** 343,374 **** } ! glPushMatrix(); R_RotateForEntity(currententity); ! glDisable(GL_TEXTURE_2D); ! glColor3f(shadelight[0], shadelight[1], shadelight[2]); // this replaces the TRIANGLE_FAN //glut.glutWireCube(gl, 20); ! glBegin(GL_TRIANGLE_FAN); ! glVertex3f(0, 0, -16); int i; for (i=0 ; i<=4 ; i++) { ! glVertex3f((float)(16.0f * Math.cos(i * Math.PI / 2)), (float)(16.0f * Math.sin(i * Math.PI / 2)), 0.0f); } ! glEnd(); ! glBegin(GL_TRIANGLE_FAN); ! glVertex3f (0, 0, 16); for (i=4 ; i>=0 ; i--) { ! glVertex3f((float)(16.0f * Math.cos(i * Math.PI / 2)), (float)(16.0f * Math.sin(i * Math.PI / 2)), 0.0f); } ! glEnd(); ! glColor3f(1, 1, 1); ! glPopMatrix(); ! glEnable(GL_TEXTURE_2D); } --- 343,374 ---- } ! gl.glPushMatrix(); R_RotateForEntity(currententity); ! gl.glDisable(GL_TEXTURE_2D); ! gl.glColor3f(shadelight[0], shadelight[1], shadelight[2]); // this replaces the TRIANGLE_FAN //glut.glutWireCube(gl, 20); ! gl.glBegin(GL_TRIANGLE_FAN); ! gl.glVertex3f(0, 0, -16); int i; for (i=0 ; i<=4 ; i++) { ! gl.glVertex3f((float)(16.0f * Math.cos(i * Math.PI / 2)), (float)(16.0f * Math.sin(i * Math.PI / 2)), 0.0f); } ! gl.glEnd(); ! gl.glBegin(GL_TRIANGLE_FAN); ! gl.glVertex3f (0, 0, 16); for (i=4 ; i>=0 ; i--) { ! gl.glVertex3f((float)(16.0f * Math.cos(i * Math.PI / 2)), (float)(16.0f * Math.sin(i * Math.PI / 2)), 0.0f); } ! gl.glEnd(); ! gl.glColor3f(1, 1, 1); ! gl.glPopMatrix(); ! gl.glEnable(GL_TEXTURE_2D); } *************** *** 414,418 **** // draw transparent entities // we could sort these if it ever becomes a problem... ! glDepthMask(false); // no z writes for (i = 0; i < r_newrefdef.num_entities; i++) { currententity = r_newrefdef.entities[i]; --- 414,418 ---- // draw transparent entities // we could sort these if it ever becomes a problem... ! gl.glDepthMask(false); // no z writes for (i = 0; i < r_newrefdef.num_entities; i++) { currententity = r_newrefdef.entities[i]; *************** *** 446,450 **** } } ! glDepthMask(true); // back to writing } --- 446,450 ---- } } ! gl.glDepthMask(true); // back to writing } *************** *** 462,470 **** GL_Bind(r_particletexture.texnum); ! glDepthMask(false); // no z buffering ! glEnable(GL_BLEND); GL_TexEnv(GL_MODULATE); ! glBegin(GL_TRIANGLES); FloatBuffer sourceVertices = particle_t.vertexArray; --- 462,470 ---- GL_Bind(r_particletexture.texnum); ! gl.glDepthMask(false); // no z buffering ! gl.glEnable(GL_BLEND); GL_TexEnv(GL_MODULATE); ! gl.glBegin(GL_TRIANGLES); FloatBuffer sourceVertices = particle_t.vertexArray; *************** *** 487,491 **** color = sourceColors.get(i); ! glColor4ub( (byte)((color) & 0xFF), (byte)((color >> 8) & 0xFF), --- 487,491 ---- color = sourceColors.get(i); ! gl.glColor4ub( (byte)((color) & 0xFF), (byte)((color >> 8) & 0xFF), *************** *** 494,511 **** ); // first vertex ! glTexCoord2f(0.0625f, 0.0625f); ! glVertex3f(origin_x, origin_y, origin_z); // second vertex ! glTexCoord2f(1.0625f, 0.0625f); ! glVertex3f(origin_x + up[0] * scale, origin_y + up[1] * scale, origin_z + up[2] * scale); // third vertex ! glTexCoord2f(0.0625f, 1.0625f); ! glVertex3f(origin_x + right[0] * scale, origin_y + right[1] * scale, origin_z + right[2] * scale); } ! glEnd(); ! glDisable(GL_BLEND); ! glColor4f(1, 1, 1, 1); ! glDepthMask(true); // back to normal Z buffering GL_TexEnv(GL_REPLACE); } --- 494,511 ---- ); // first vertex ! gl.glTexCoord2f(0.0625f, 0.0625f); ! gl.glVertex3f(origin_x, origin_y, origin_z); // second vertex ! gl.glTexCoord2f(1.0625f, 0.0625f); ! gl.glVertex3f(origin_x + up[0] * scale, origin_y + up[1] * scale, origin_z + up[2] * scale); // third vertex ! gl.glTexCoord2f(0.0625f, 1.0625f); ! gl.glVertex3f(origin_x + right[0] * scale, origin_y + right[1] * scale, origin_z + right[2] * scale); } ! gl.glEnd(); ! gl.glDisable(GL_BLEND); ! gl.glColor4f(1, 1, 1, 1); ! gl.glDepthMask(true); // back to normal Z buffering GL_TexEnv(GL_REPLACE); } *************** *** 518,540 **** if (gl_ext_pointparameters.value != 0.0f && qglPointParameterfEXT) { ! //gl.glEnableClientState(GL_VERTEX_ARRAY); ! glVertexPointer(3, 0, particle_t.vertexArray); ! glEnableClientState(GL_COLOR_ARRAY); ! glColorPointer(4, true, 0, particle_t.getColorAsByteBuffer()); ! glDepthMask(false); ! glEnable(GL_BLEND); ! glDisable(GL_TEXTURE_2D); ! glPointSize(gl_particle_size.value); ! glDrawArrays(GL_POINTS, 0, r_newrefdef.num_particles); ! glDisableClientState(GL_COLOR_ARRAY); ! //gl.glDisableClientState(GL_VERTEX_ARRAY); ! glDisable(GL_BLEND); ! glColor4f(1.0F, 1.0F, 1.0F, 1.0F); ! glDepthMask(true); ! glEnable(GL_TEXTURE_2D); } --- 518,540 ---- if (gl_ext_pointparameters.value != 0.0f && qglPointParameterfEXT) { ! //gl.gl.glEnableClientState(GL_VERTEX_ARRAY); ! gl.glVertexPointer(3, 0, particle_t.vertexArray); ! gl.glEnableClientState(GL_COLOR_ARRAY); ! gl.glColorPointer(4, true, 0, particle_t.getColorAsByteBuffer()); ! gl.glDepthMask(false); ! gl.glEnable(GL_BLEND); ! gl.glDisable(GL_TEXTURE_2D); ! gl.glPointSize(gl_particle_size.value); ! gl.glDrawArrays(GL_POINTS, 0, r_newrefdef.num_particles); ! gl.glDisableClientState(GL_COLOR_ARRAY); ! //gl.gl.glDisableClientState(GL_VERTEX_ARRAY); ! gl.glDisable(GL_BLEND); ! gl.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); ! gl.glDepthMask(true); ! gl.glEnable(GL_TEXTURE_2D); } *************** *** 554,583 **** return; ! glDisable(GL_ALPHA_TEST); ! glEnable(GL_BLEND); ! glDisable(GL_DEPTH_TEST); ! glDisable(GL_TEXTURE_2D); ! glLoadIdentity(); // FIXME: get rid of these ! glRotatef(-90, 1, 0, 0); // put Z going up ! glRotatef(90, 0, 0, 1); // put Z going up ! glColor4f(v_blend[0], v_blend[1], v_blend[2], v_blend[3]); ! glBegin(GL_QUADS); ! glVertex3f(10, 100, 100); ! glVertex3f(10, -100, 100); ! glVertex3f(10, -100, -100); ! glVertex3f(10, 100, -100); ! glEnd(); ! glDisable(GL_BLEND); ! glEnable(GL_TEXTURE_2D); ! glEnable(GL_ALPHA_TEST); ! glColor4f(1, 1, 1, 1); } --- 554,583 ---- return; ! gl.glDisable(GL_ALPHA_TEST); ! gl.glEnable(GL_BLEND); ! gl.glDisable(GL_DEPTH_TEST); ! gl.glDisable(GL_TEXTURE_2D); ! gl.glLoadIdentity(); // FIXME: get rid of these ! gl.glRotatef(-90, 1, 0, 0); // put Z going up ! gl.glRotatef(90, 0, 0, 1); // put Z going up ! gl.glColor4f(v_blend[0], v_blend[1], v_blend[2], v_blend[3]); ! gl.glBegin(GL_QUADS); ! gl.glVertex3f(10, 100, 100); ! gl.glVertex3f(10, -100, 100); ! gl.glVertex3f(10, -100, -100); ! gl.glVertex3f(10, 100, -100); ! gl.glEnd(); ! gl.glDisable(GL_BLEND); ! gl.glEnable(GL_TEXTURE_2D); ! gl.glEnable(GL_ALPHA_TEST); ! gl.glColor4f(1, 1, 1, 1); } *************** *** 665,678 **** // clear out the portion of the screen that the NOWORLDMODEL defines if ((r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) != 0) { ! glEnable(GL_SCISSOR_TEST); ! glClearColor(0.3f, 0.3f, 0.3f, 1.0f); ! glScissor( r_newrefdef.x, vid.height - r_newrefdef.height - r_newrefdef.y, r_newrefdef.width, r_newrefdef.height); ! glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ! glClearColor(1.0f, 0.0f, 0.5f, 0.5f); ! glDisable(GL_SCISSOR_TEST); } } --- 665,678 ---- // clear out the portion of the screen that the NOWORLDMODEL defines if ((r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) != 0) { ! gl.glEnable(GL_SCISSOR_TEST); ! gl.glClearColor(0.3f, 0.3f, 0.3f, 1.0f); ! gl.glScissor( r_newrefdef.x, vid.height - r_newrefdef.height - r_newrefdef.y, r_newrefdef.width, r_newrefdef.height); ! gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ! gl.glClearColor(1.0f, 0.0f, 0.5f, 0.5f); ! gl.glDisable(GL_SCISSOR_TEST); } } *************** *** 696,700 **** xmax += - (2 * gl_state.camera_separation) / zNear; ! glFrustum(xmin, xmax, ymin, ymax, zNear, zFar); } --- 696,700 ---- xmax += - (2 * gl_state.camera_separation) / zNear; ! gl.glFrustum(xmin, xmax, ymin, ymax, zNear, zFar); } *************** *** 719,723 **** int h = y - y2; ! glViewport(x, y2, w, h); // --- 719,723 ---- int h = y - y2; ! gl.glViewport(x, y2, w, h); // *************** *** 725,745 **** // float screenaspect = (float) r_newrefdef.width / r_newrefdef.height; ! glMatrixMode(GL_PROJECTION); ! glLoadIdentity(); MYgluPerspective(r_newrefdef.fov_y, screenaspect, 4, 4096); ! glCullFace(GL_FRONT); ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity(); ! glRotatef(-90, 1, 0, 0); // put Z going up ! glRotatef(90, 0, 0, 1); // put Z going up ! glRotatef(-r_newrefdef.viewangles[2], 1, 0, 0); ! glRotatef(-r_newrefdef.viewangles[0], 0, 1, 0); ! glRotatef(-r_newrefdef.viewangles[1], 0, 0, 1); ! glTranslatef(-r_newrefdef.vieworg[0], -r_newrefdef.vieworg[1], -r_newrefdef.vieworg[2]); ! glGetFloat(GL_MODELVIEW_MATRIX, r_world_matrix); r_world_matrix.clear(); --- 725,745 ---- // float screenaspect = (float) r_newrefdef.width / r_newrefdef.height; ! gl.glMatrixMode(GL_PROJECTION); ! gl.glLoadIdentity(); MYgluPerspective(r_newrefdef.fov_y, screenaspect, 4, 4096); ! gl.glCullFace(GL_FRONT); ! gl.glMatrixMode(GL_MODELVIEW); ! gl.glLoadIdentity(); ! gl.glRotatef(-90, 1, 0, 0); // put Z going up ! gl.glRotatef(90, 0, 0, 1); // put Z going up ! gl.glRotatef(-r_newrefdef.viewangles[2], 1, 0, 0); ! gl.glRotatef(-r_newrefdef.viewangles[0], 0, 1, 0); ! gl.glRotatef(-r_newrefdef.viewangles[1], 0, 0, 1); ! gl.glTranslatef(-r_newrefdef.vieworg[0], -r_newrefdef.vieworg[1], -r_newrefdef.vieworg[2]); ! gl.glGetFloat(GL_MODELVIEW_MATRIX, r_world_matrix); r_world_matrix.clear(); *************** *** 748,758 **** // if (gl_cull.value != 0.0f) ! glEnable(GL_CULL_FACE); else ! glDisable(GL_CULL_FACE); ! glDisable(GL_BLEND); ! glDisable(GL_ALPHA_TEST); ! glEnable(GL_DEPTH_TEST); } --- 748,758 ---- // if (gl_cull.value != 0.0f) ! gl.glEnable(GL_CULL_FACE); else ! gl.glDisable(GL_CULL_FACE); ! gl.glDisable(GL_BLEND); ! gl.glDisable(GL_ALPHA_TEST); ! gl.glEnable(GL_DEPTH_TEST); } *************** *** 766,770 **** if (gl_clear.value != 0.0f) { ! glClear(GL_COLOR_BUFFER_BIT); } --- 766,770 ---- if (gl_clear.value != 0.0f) { ! gl.glClear(GL_COLOR_BUFFER_BIT); } *************** *** 773,795 **** gldepthmin = 0; gldepthmax = 0.49999f; ! glDepthFunc(GL_LEQUAL); } else { gldepthmin = 1; gldepthmax = 0.5f; ! glDepthFunc(GL_GEQUAL); } } else { if (gl_clear.value != 0.0f) ! glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); else ! glClear(GL_DEPTH_BUFFER_BIT); gldepthmin = 0; gldepthmax = 1; ! glDepthFunc(GL_LEQUAL); } ! glDepthRange(gldepthmin, gldepthmax); } --- 773,795 ---- gldepthmin = 0; gldepthmax = 0.49999f; ! gl.glDepthFunc(GL_LEQUAL); } else { gldepthmin = 1; gldepthmax = 0.5f; ! gl.glDepthFunc(GL_GEQUAL); } } else { if (gl_clear.value != 0.0f) ! gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); else ! gl.glClear(GL_DEPTH_BUFFER_BIT); gldepthmin = 0; gldepthmax = 1; ! gl.glDepthFunc(GL_LEQUAL); } ! gl.glDepthRange(gldepthmin, gldepthmax); } *************** *** 828,832 **** if (gl_finish.value != 0.0f) ! glFinish(); R_SetupFrame(); --- 828,832 ---- if (gl_finish.value != 0.0f) ! gl.glFinish(); R_SetupFrame(); *************** *** 863,877 **** void R_SetGL2D() { // set 2D virtual screen size ! glViewport(0, 0, vid.width, vid.height); ! glMatrixMode(GL_PROJECTION); ! glLoadIdentity(); ! glOrtho(0, vid.width, vid.height, 0, -99999, 99999); ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity(); ! glDisable(GL_DEPTH_TEST); ! glDisable(GL_CULL_FACE); ! glDisable(GL_BLEND); ! glEnable(GL_ALPHA_TEST); ! glColor4f(1, 1, 1, 1); } --- 863,877 ---- void R_SetGL2D() { // set 2D virtual screen size ! gl.glViewport(0, 0, vid.width, vid.height); ! gl.glMatrixMode(GL_PROJECTION); ! gl.glLoadIdentity(); ! gl.glOrtho(0, vid.width, vid.height, 0, -99999, 99999); ! gl.glMatrixMode(GL_MODELVIEW); ! gl.glLoadIdentity(); ! gl.glDisable(GL_DEPTH_TEST); ! gl.glDisable(GL_CULL_FACE); ! gl.glDisable(GL_BLEND); ! gl.glEnable(GL_ALPHA_TEST); ! gl.glColor4f(1, 1, 1, 1); } *************** *** 1092,1102 **** ** get our various GL strings */ ! gl_config.vendor_string = glGetString(GL_VENDOR); VID.Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); ! gl_config.renderer_string = glGetString(GL_RENDERER); VID.Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); ! gl_config.version_string = glGetString(GL_VERSION); VID.Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); ! gl_config.extensions_string = glGetString(GL_EXTENSIONS); VID.Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); --- 1092,1102 ---- ** get our various GL strings */ ! gl_config.vendor_string = gl.glGetString(GL_VENDOR); VID.Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); ! gl_config.renderer_string = gl.glGetString(GL_RENDERER); VID.Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); ! gl_config.version_string = gl.glGetString(GL_VERSION); VID.Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); ! gl_config.extensions_string = gl.glGetString(GL_EXTENSIONS); VID.Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); *************** *** 1178,1187 **** || gl_config.extensions_string.indexOf("GL_SGI_compiled_vertex_array") >= 0) { VID.Printf(Defines.PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n"); ! // qglLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" ); if (gl_ext_compiled_vertex_array.value != 0.0f) qglLockArraysEXT = true; else qglLockArraysEXT = false; ! // qglUnlockArraysEXT = ( void * ) qwglGetProcAddress( "glUnlockArraysEXT" ); //qglUnlockArraysEXT = true; } --- 1178,1187 ---- || gl_config.extensions_string.indexOf("GL_SGI_compiled_vertex_array") >= 0) { VID.Printf(Defines.PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n"); ! // qgl.glLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" ); if (gl_ext_compiled_vertex_array.value != 0.0f) qglLockArraysEXT = true; else qglLockArraysEXT = false; ! // qgl.glUnlockArraysEXT = ( void * ) qwglGetProcAddress( "glUnlockArraysEXT" ); //qglUnlockArraysEXT = true; } *************** *** 1201,1207 **** if (gl_config.extensions_string.indexOf("GL_EXT_point_parameters") >= 0) { if (gl_ext_pointparameters.value != 0.0f) { ! // qglPointParameterfEXT = ( void (APIENTRY *)( GLenum, GLfloat ) ) qwglGetProcAddress( "glPointParameterfEXT" ); qglPointParameterfEXT = true; ! // qglPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" ); VID.Printf(Defines.PRINT_ALL, "...using GL_EXT_point_parameters\n"); } --- 1201,1207 ---- if (gl_config.extensions_string.indexOf("GL_EXT_point_parameters") >= 0) { if (gl_ext_pointparameters.value != 0.0f) { ! // qgl.glPointParameterfEXT = ( void (APIENTRY *)( GLenum, GLfloat ) ) qwglGetProcAddress( "glPointParameterfEXT" ); qglPointParameterfEXT = true; ! // qgl.glPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" ); VID.Printf(Defines.PRINT_ALL, "...using GL_EXT_point_parameters\n"); } *************** *** 1220,1224 **** // { // VID.Printf( Defines.PRINT_ALL, "...using 3DFX_set_global_palette\n" ); ! // qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwglGetProcAddress( "gl3DfxSetPaletteEXT" ); //// qglColorTableEXT = Fake_glColorTableEXT; // } --- 1220,1224 ---- // { // VID.Printf( Defines.PRINT_ALL, "...using 3DFX_set_global_palette\n" ); ! // qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwgl.glGetProcAddress( "gl3DfxSetPaletteEXT" ); //// qglColorTableEXT = Fake_glColorTableEXT; // } *************** *** 1270,1279 **** Draw_InitLocal(); ! int err = glGetError(); if (err != GL_NO_ERROR) VID.Printf( Defines.PRINT_ALL, ! "glGetError() = 0x%x\n\t%s\n", ! new Vargs(2).add(err).add("" + glGetString(err))); return true; --- 1270,1279 ---- Draw_InitLocal(); ! int err = gl.glGetError(); if (err != GL_NO_ERROR) VID.Printf( Defines.PRINT_ALL, ! "gl.glGetError() = 0x%x\n\t%s\n", ! new Vargs(2).add(err).add("" + gl.glGetString(err))); return true; *************** *** 1355,1369 **** ** go into 2D mode */ ! glViewport(0, 0, vid.width, vid.height); ! glMatrixMode(GL_PROJECTION); ! glLoadIdentity(); ! glOrtho(0, vid.width, vid.height, 0, -99999, 99999); ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity(); ! glDisable(GL_DEPTH_TEST); ! glDisable(GL_CULL_FACE); ! glDisable(GL_BLEND); ! glEnable(GL_ALPHA_TEST); ! glColor4f(1, 1, 1, 1); /* --- 1355,1369 ---- ** go into 2D mode */ ! gl.glViewport(0, 0, vid.width, vid.height); ! gl.glMatrixMode(GL_PROJECTION); ! gl.glLoadIdentity(); ! gl.glOrtho(0, vid.width, vid.height, 0, -99999, 99999); ! gl.glMatrixMode(GL_MODELVIEW); ! gl.glLoadIdentity(); ! gl.glDisable(GL_DEPTH_TEST); ! gl.glDisable(GL_CULL_FACE); ! gl.glDisable(GL_BLEND); ! gl.glEnable(GL_ALPHA_TEST); ! gl.glColor4f(1, 1, 1, 1); /* *************** *** 1375,1381 **** if (gl_state.camera_separation == 0 || !gl_state.stereo_enabled) { if (gl_drawbuffer.string.equalsIgnoreCase("GL_FRONT")) ! glDrawBuffer(GL_FRONT); else ! glDrawBuffer(GL_BACK); } } --- 1375,1381 ---- if (gl_state.camera_separation == 0 || !gl_state.stereo_enabled) { if (gl_drawbuffer.string.equalsIgnoreCase("GL_FRONT")) ! gl.glDrawBuffer(GL_FRONT); else ! gl.glDrawBuffer(GL_BACK); } } *************** *** 1438,1444 **** GL_SetTexturePalette(r_rawpalette); ! glClearColor(0, 0, 0, 0); ! glClear(GL_COLOR_BUFFER_BIT); ! glClearColor(1f, 0f, 0.5f, 0.5f); } --- 1438,1444 ---- GL_SetTexturePalette(r_rawpalette); ! gl.glClearColor(0, 0, 0, 0); ! gl.glClear(GL_COLOR_BUFFER_BIT); ! gl.glClearColor(1f, 0f, 0.5f, 0.5f); } *************** *** 1487,1493 **** } ! glDisable(GL_TEXTURE_2D); ! glEnable(GL_BLEND); ! glDepthMask(false); float r = (d_8to24table[e.skinnum & 0xFF]) & 0xFF; --- 1487,1493 ---- } ! gl.glDisable(GL_TEXTURE_2D); ! gl.glEnable(GL_BLEND); ! gl.glDepthMask(false); float r = (d_8to24table[e.skinnum & 0xFF]) & 0xFF; *************** *** 1499,1505 **** b *= 1 / 255.0f; ! glColor4f(r, g, b, e.alpha); ! glBegin(GL_TRIANGLE_STRIP); float[] v; --- 1499,1505 ---- b *= 1 / 255.0f; ! gl.glColor4f(r, g, b, e.alpha); ! gl.glBegin(GL_TRIANGLE_STRIP); float[] v; *************** *** 1507,1523 **** for (int i = 0; i < NUM_BEAM_SEGS; i++) { v = start_points[i]; ! glVertex3f(v[0], v[1], v[2]); v = end_points[i]; ! glVertex3f(v[0], v[1], v[2]); v = start_points[(i + 1) % NUM_BEAM_SEGS]; ! glVertex3f(v[0], v[1], v[2]); v = end_points[(i + 1) % NUM_BEAM_SEGS]; ! glVertex3f(v[0], v[1], v[2]); } ! glEnd(); ! glEnable(GL_TEXTURE_2D); ! glDisable(GL_BLEND); ! glDepthMask(true); } } \ No newline at end of file --- 1507,1523 ---- for (int i = 0; i < NUM_BEAM_SEGS; i++) { v = start_points[i]; ! gl.glVertex3f(v[0], v[1], v[2]); v = end_points[i]; ! gl.glVertex3f(v[0], v[1], v[2]); v = start_points[(i + 1) % NUM_BEAM_SEGS]; ! gl.glVertex3f(v[0], v[1], v[2]); v = end_points[(i + 1) % NUM_BEAM_SEGS]; ! gl.glVertex3f(v[0], v[1], v[2]); } ! gl.glEnd(); ! gl.glEnable(GL_TEXTURE_2D); ! gl.glDisable(GL_BLEND); ! gl.glDepthMask(true); } } \ No newline at end of file Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Surf.java,v retrieving revision 1.9.4.1 retrieving revision 1.9.4.2 diff -C2 -d -r1.9.4.1 -r1.9.4.2 *** Surf.java 10 Jul 2005 17:55:50 -0000 1.9.4.1 --- Surf.java 16 Jul 2005 18:22:37 -0000 1.9.4.2 *************** *** 136,140 **** void DrawGLPoly(glpoly_t p) { ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); } --- 136,140 ---- void DrawGLPoly(glpoly_t p) { ! gl.glDrawArrays(GL_POLYGON, p.pos, p.numverts); } *************** *** 149,153 **** scroll = -64.0f; p.beginScrolling(scroll); ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } --- 149,153 ---- scroll = -64.0f; p.beginScrolling(scroll); ! gl.glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } *************** *** 161,167 **** return; ! glDisable(GL_TEXTURE_2D); ! glDisable(GL_DEPTH_TEST); ! glColor4f(1, 1, 1, 1); msurface_t surf; --- 161,167 ---- return; ! gl.glDisable(GL_TEXTURE_2D); ! gl.glDisable(GL_DEPTH_TEST); ! gl.glColor4f(1, 1, 1, 1); msurface_t surf; *************** *** 172,181 **** for (p = surf.polys; p != null; p = p.chain) { for (j = 2; j < p.numverts; j++) { ! glBegin(GL_LINE_STRIP); ! glVertex3f(p.x(0), p.y(0), p.z(0)); ! glVertex3f(p.x(j-1), p.y(j-1), p.z(j-1)); ! glVertex3f(p.x(j), p.y(j), p.z(j)); ! glVertex3f(p.x(0), p.y(0), p.z(0)); ! glEnd(); } } --- 172,181 ---- for (p = surf.polys; p != null; p = p.chain) { for (j = 2; j < p.numverts; j++) { ! gl.glBegin(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(); } } *************** *** 183,188 **** } ! glEnable(GL_DEPTH_TEST); ! glEnable(GL_TEXTURE_2D); } --- 183,188 ---- } ! gl.glEnable(GL_DEPTH_TEST); ! gl.glEnable(GL_TEXTURE_2D); } *************** *** 204,208 **** // warp texture, no lightmaps GL_TexEnv( GL_MODULATE ); ! glColor4f( gl_state.inverse_intensity, gl_state.inverse_intensity, gl_state.inverse_intensity, --- 204,208 ---- // warp texture, no lightmaps GL_TexEnv( GL_MODULATE ); ! gl.glColor4f( gl_state.inverse_intensity, gl_state.inverse_intensity, gl_state.inverse_intensity, *************** *** 274,278 **** GL_Bind( gl_state.lightmap_textures + fa.lightmaptexturenum ); ! glTexSubImage2D( GL_TEXTURE_2D, 0, fa.light_s, fa.light_t, smax, tmax, --- 274,278 ---- GL_Bind( gl_state.lightmap_textures + fa.lightmaptexturenum ); ! gl.glTexSubImage2D( GL_TEXTURE_2D, 0, fa.light_s, fa.light_t, smax, tmax, *************** *** 309,315 **** // go back to the world matrix // ! glLoadMatrix(r_world_matrix); ! glEnable (GL_BLEND); GL_TexEnv(GL_MODULATE ); --- 309,315 ---- // go back to the world matrix // ! gl.glLoadMatrix(r_world_matrix); ! gl.glEnable (GL_BLEND); GL_TexEnv(GL_MODULATE ); *************** *** 319,323 **** float intens = gl_state.inverse_intensity; ! glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); for (msurface_t s = r_alpha_surfaces ; s != null ; s=s.texturechain) --- 319,323 ---- float intens = gl_state.inverse_intensity; ! gl.glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); for (msurface_t s = r_alpha_surfaces ; s != null ; s=s.texturechain) *************** *** 326,334 **** c_brush_polys++; if ((s.texinfo.flags & Defines.SURF_TRANS33) != 0) ! glColor4f (intens, intens, intens, 0.33f); else if ((s.texinfo.flags & Defines.SURF_TRANS66) != 0) ! glColor4f (intens, intens, intens, 0.66f); else ! glColor4f (intens,intens,intens,1); if ((s.flags & Defines.SURF_DRAWTURB) != 0) EmitWaterPolys(s); --- 326,334 ---- c_brush_polys++; if ((s.texinfo.flags & Defines.SURF_TRANS33) != 0) ! gl.glColor4f (intens, intens, intens, 0.33f); else if ((s.texinfo.flags & Defines.SURF_TRANS66) != 0) ! gl.glColor4f (intens, intens, intens, 0.66f); else ! gl.glColor4f (intens,intens,intens,1); if ((s.flags & Defines.SURF_DRAWTURB) != 0) EmitWaterPolys(s); *************** *** 340,345 **** GL_TexEnv( GL_REPLACE ); ! glColor4f (1,1,1,1); ! glDisable (GL_BLEND); r_alpha_surfaces = null; --- 340,345 ---- GL_TexEnv( GL_REPLACE ); ! gl.glColor4f (1,1,1,1); ! gl.glDisable (GL_BLEND); r_alpha_surfaces = null; *************** *** 456,460 **** lmtex = surf.lightmaptexturenum; ! glTexSubImage2D( GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, --- 456,460 ---- lmtex = surf.lightmaptexturenum; ! gl.glTexSubImage2D( GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, *************** *** 474,478 **** lmtex = 0; ! glTexSubImage2D( GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, --- 474,478 ---- lmtex = 0; ! gl.glTexSubImage2D( GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, *************** *** 500,504 **** { p.beginScrolling(scroll); ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } --- 500,504 ---- { p.beginScrolling(scroll); ! gl.glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } *************** *** 508,512 **** for ( p = surf.polys; p != null; p = p.chain ) { ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); } } --- 508,512 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glDrawArrays(GL_POLYGON, p.pos, p.numverts); } } *************** *** 534,538 **** { p.beginScrolling(scroll); ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } --- 534,538 ---- { p.beginScrolling(scroll); ! gl.glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } *************** *** 544,548 **** for ( p = surf.polys; p != null; p = p.chain ) { ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); } --- 544,548 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glDrawArrays(GL_POLYGON, p.pos, p.numverts); } *************** *** 578,583 **** if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! glEnable (GL_BLEND); ! glColor4f (1,1,1,0.25f); GL_TexEnv( GL_MODULATE ); } --- 578,583 ---- if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! gl.glEnable (GL_BLEND); ! gl.glColor4f (1,1,1,0.25f); GL_TexEnv( GL_MODULATE ); } *************** *** 620,625 **** if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! glDisable (GL_BLEND); ! glColor4f (1,1,1,1); GL_TexEnv( GL_REPLACE ); } --- 620,625 ---- if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! gl.glDisable (GL_BLEND); ! gl.glColor4f (1,1,1,1); GL_TexEnv( GL_REPLACE ); } *************** *** 663,667 **** if (R_CullBox(mins, maxs)) return; ! glColor3f (1,1,1); // memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces)); --- 663,667 ---- if (R_CullBox(mins, maxs)) return; ! gl.glColor3f (1,1,1); // memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces)); *************** *** 680,684 **** } ! glPushMatrix(); e.angles[0] = -e.angles[0]; // stupid quake bug --- 680,684 ---- } ! gl.glPushMatrix(); e.angles[0] = -e.angles[0]; // stupid quake bug *************** *** 691,708 **** GL_SelectTexture(TEXTURE0); GL_TexEnv( GL_REPLACE ); ! glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(TEXTURE1); GL_TexEnv( GL_MODULATE ); ! glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); ! glEnableClientState(GL_TEXTURE_COORD_ARRAY); R_DrawInlineBModel(); ! glClientActiveTextureARB(TEXTURE1); ! glDisableClientState(GL_TEXTURE_COORD_ARRAY); GL_EnableMultitexture( false ); ! glPopMatrix(); } --- 691,708 ---- GL_SelectTexture(TEXTURE0); GL_TexEnv( GL_REPLACE ); ! gl.glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(TEXTURE1); GL_TexEnv( GL_MODULATE ); ! gl.glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); ! gl.glEnableClientState(GL_TEXTURE_COORD_ARRAY); R_DrawInlineBModel(); ! gl.glClientActiveTextureARB(TEXTURE1); ! gl.glDisableClientState(GL_TEXTURE_COORD_ARRAY); GL_EnableMultitexture( false ); ! gl.glPopMatrix(); } *************** *** 864,868 **** gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1; ! glColor3f (1,1,1); // memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces)); // TODO wird bei multitexture nicht gebraucht --- 864,868 ---- gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1; ! gl.glColor3f (1,1,1); // memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces)); // TODO wird bei multitexture nicht gebraucht *************** *** 875,882 **** GL_SelectTexture(TEXTURE0); GL_TexEnv( GL_REPLACE ); ! glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(TEXTURE1); ! glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); ! glEnableClientState(GL_TEXTURE_COORD_ARRAY); if ( gl_lightmap.value != 0) --- 875,882 ---- GL_SelectTexture(TEXTURE0); GL_TexEnv( GL_REPLACE ); ! gl.glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(TEXTURE1); ! gl.glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); ! gl.glEnableClientState(GL_TEXTURE_COORD_ARRAY); if ( gl_lightmap.value != 0) *************** *** 887,892 **** R_RecursiveWorldNode(r_worldmodel.nodes[0]); // root node ! glClientActiveTextureARB(TEXTURE1); ! glDisableClientState(GL_TEXTURE_COORD_ARRAY); GL_EnableMultitexture( false ); --- 887,892 ---- R_RecursiveWorldNode(r_worldmodel.nodes[0]); // root node ! gl.glClientActiveTextureARB(TEXTURE1); ! gl.glDisableClientState(GL_TEXTURE_COORD_ARRAY); GL_EnableMultitexture( false ); *************** *** 997,1002 **** GL_Bind( gl_state.lightmap_textures + texture ); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); gl_lms.lightmap_buffer.rewind(); --- 997,1002 ---- GL_Bind( gl_state.lightmap_textures + texture ); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); gl_lms.lightmap_buffer.rewind(); *************** *** 1010,1014 **** } ! glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, --- 1010,1014 ---- } ! gl.glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, *************** *** 1020,1024 **** else { ! glTexImage2D( GL_TEXTURE_2D, 0, gl_lms.internal_format, --- 1020,1024 ---- else { ! gl.glTexImage2D( GL_TEXTURE_2D, 0, gl_lms.internal_format, *************** *** 1276,1282 **** */ GL_Bind( gl_state.lightmap_textures + 0 ); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ! glTexImage2D( GL_TEXTURE_2D, 0, gl_lms.internal_format, --- 1276,1282 ---- */ GL_Bind( gl_state.lightmap_textures + 0 ); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! gl.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ! gl.glTexImage2D( GL_TEXTURE_2D, 0, gl_lms.internal_format, Index: LWJGLBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/LWJGLBase.java,v retrieving revision 1.2.6.1 retrieving revision 1.2.6.2 diff -C2 -d -r1.2.6.1 -r1.2.6.2 *** LWJGLBase.java 10 Jul 2005 17:55:51 -0000 1.2.6.1 --- LWJGLBase.java 16 Jul 2005 18:22:37 -0000 1.2.6.2 *************** *** 43,47 **** * @author dsanders/cwei */ ! public abstract class LWJGLBase extends Misc { // IMPORTED FUNCTIONS protected DisplayMode oldDisplayMode; --- 43,47 ---- * @author dsanders/cwei */ ! public abstract class LWJGLBase extends jake2.render.lwjgl.Misc { // IMPORTED FUNCTIONS protected DisplayMode oldDisplayMode; *************** *** 278,282 **** protected void GLimp_EndFrame() { ! glFlush(); // swap buffers Display.update(); --- 278,282 ---- protected void GLimp_EndFrame() { ! gl.glFlush(); // swap buffers Display.update(); Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Light.java,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -C2 -d -r1.4.6.1 -r1.4.6.2 *** Light.java 10 Jul 2005 17:55:50 -0000 1.4.6.1 --- Light.java 16 Jul 2005 18:22:37 -0000 1.4.6.2 *************** *** 70,81 **** Math3D.VectorSubtract (light.origin, r_origin, v); ! glBegin (GL_TRIANGLE_FAN); ! glColor3f (light.color[0]*0.2f, light.color[1]*0.2f, light.color[2]*0.2f); int i; for (i=0 ; i<3 ; i++) v[i] = light.origin[i] - vpn[i]*rad; ! glVertex3f(v[0], v[1], v[2]); ! glColor3f (0,0,0); int j; --- 70,81 ---- Math3D.VectorSubtract (light.origin, r_origin, v); ! gl.glBegin (GL_TRIANGLE_FAN); ! gl.glColor3f (light.color[0]*0.2f, light.color[1]*0.2f, light.color[2]*0.2f); int i; for (i=0 ; i<3 ; i++) v[i] = light.origin[i] - vpn[i]*rad; ! gl.glVertex3f(v[0], v[1], v[2]); ! gl.glColor3f (0,0,0); int j; *************** *** 87,93 **** v[j] = (float)(light.origin[j] + vright[j]*Math.cos(a)*rad + vup[j]*Math.sin(a)*rad); ! glVertex3f(v[0], v[1], v[2]); } ! glEnd (); } --- 87,93 ---- v[j] = (float)(light.origin[j] + vright[j]*Math.cos(a)*rad + vup[j]*Math.sin(a)*rad); ! gl.glVertex3f(v[0], v[1], v[2]); } ! gl.glEnd (); } *************** *** 102,110 **** r_dlightframecount = r_framecount + 1; // because the count hasn't // advanced yet for this frame ! glDepthMask(false); ! glDisable(GL_TEXTURE_2D); ! glShadeModel (GL_SMOOTH); ! glEnable (GL_BLEND); ! glBlendFunc (GL_ONE, GL_ONE); for (int i=0 ; i<r_newrefdef.num_dlights ; i++) --- 102,110 ---- r_dlightframecount = r_framecount + 1; // because the count hasn't // advanced yet for this frame ! gl.glDepthMask(false); ! gl.glDisable(GL_TEXTURE_2D); ! gl.glShadeModel (GL_SMOOTH); ! gl.glEnable (GL_BLEND); ! gl.glBlendFunc (GL_ONE, GL_ONE); for (int i=0 ; i<r_newrefdef.num_dlights ; i++) *************** *** 113,121 **** } ! glColor3f (1,1,1); ! glDisable(GL_BLEND); ! glEnable(GL_TEXTURE_2D); ! glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ! glDepthMask(true); } --- 113,121 ---- } ! gl.glColor3f (1,1,1); ! gl.glDisable(GL_BLEND); ! gl.glEnable(GL_TEXTURE_2D); ! gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ! gl.glDepthMask(true); } Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Warp.java,v retrieving revision 1.5.6.1 retrieving revision 1.5.6.2 diff -C2 -d -r1.5.6.1 -r1.5.6.2 *** Warp.java 10 Jul 2005 17:55:50 -0000 1.5.6.1 --- Warp.java 16 Jul 2005 18:22:37 -0000 1.5.6.2 *************** *** 289,293 **** p = bp; ! glBegin(GL_TRIANGLE_FAN); for (i = 0; i < p.numverts; i++) { os = p.s1(i); --- 289,293 ---- p = bp; ! gl.glBegin(GL_TRIANGLE_FAN); for (i = 0; i < p.numverts; i++) { os = p.s1(i); *************** *** 303,310 **** t *= (1.0f / 64); ! glTexCoord2f(s, t); ! glVertex3f(p.x(i), p.y(i), p.z(i)); } ! glEnd(); } } --- 303,310 ---- t *= (1.0f / 64); ! gl.glTexCoord2f(s, t); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } ! gl.glEnd(); } } *************** *** 611,616 **** t = 1.0f - t; ! glTexCoord2f (s, t); ! glVertex3f(v1[0], v1[1], v1[2]); } --- 611,616 ---- t = 1.0f - t; ! gl.glTexCoord2f (s, t); ! gl.glVertex3f(v1[0], v1[1], v1[2]); } *************** *** 634,640 **** } ! glPushMatrix (); ! glTranslatef (r_origin[0], r_origin[1], r_origin[2]); ! glRotatef (r_newrefdef.time * skyrotate, skyaxis[0], skyaxis[1], skyaxis[2]); for (i=0 ; i<6 ; i++) --- 634,640 ---- } ! gl.glPushMatrix (); ! gl.glTranslatef (r_origin[0], r_origin[1], r_origin[2]); ! gl.glRotatef (r_newrefdef.time * skyrotate, skyaxis[0], skyaxis[1], skyaxis[2]); for (i=0 ; i<6 ; i++) *************** *** 654,665 **** GL_Bind(sky_images[skytexorder[i]].texnum); ! glBegin(GL_QUADS); MakeSkyVec(skymins[0][i], skymins[1][i], i); MakeSkyVec(skymins[0][i], skymaxs[1][i], i); MakeSkyVec(skymaxs[0][i], skymaxs[1][i], i); MakeSkyVec(skymaxs[0][i], skymins[1][i], i); ! glEnd (); } ! glPopMatrix (); } --- 654,665 ---- GL_Bind(sky_images[skytexorder[i]].texnum); ! gl.glBegin(GL_QUADS); MakeSkyVec(skymins[0][i], skymins[1][i], i); MakeSkyVec(skymins[0][i], skymaxs[1][i], i); MakeSkyVec(skymaxs[0][i], skymaxs[1][i], i); MakeSkyVec(skymaxs[0][i], skymins[1][i], i); ! gl.glEnd (); } ! gl.glPopMatrix (); } Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Mesh.java,v retrieving revision 1.8.4.1 retrieving revision 1.8.4.2 diff -C2 -d -r1.8.4.1 -r1.8.4.2 *** Mesh.java 10 Jul 2005 17:55:51 -0000 1.8.4.1 --- Mesh.java 16 Jul 2005 18:22:37 -0000 1.8.4.2 *************** *** 150,154 **** // PMM - added double shell 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) ! glDisable( GL_TEXTURE_2D ); float frontlerp = 1.0f - backlerp; --- 150,154 ---- // PMM - added double shell 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) ! gl.glDisable( GL_TEXTURE_2D ); float frontlerp = 1.0f - backlerp; *************** *** 175,190 **** GL_LerpVerts( paliashdr.num_xyz, ov, verts, move, frontv, backv ); ! //gl.glEnableClientState( GL_VERTEX_ARRAY ); ! glVertexPointer( 3, 0, vertexArrayBuf ); // PMM - added double damage shell 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) { ! glColor4f( shadelight[0], shadelight[1], shadelight[2], alpha ); } else { ! glEnableClientState( GL_COLOR_ARRAY ); ! glColorPointer( 4, 0, colorArrayBuf ); // --- 175,190 ---- GL_LerpVerts( paliashdr.num_xyz, ov, verts, move, frontv, backv ); ! //gl.gl.glEnableClientState( GL_VERTEX_ARRAY ); ! gl.glVertexPointer( 3, 0, vertexArrayBuf ); // PMM - added double damage shell 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) { ! gl.glColor4f( shadelight[0], shadelight[1], shadelight[2], alpha ); } else { ! gl.glEnableClientState( GL_COLOR_ARRAY ); ! gl.glColorPointer( 4, 0, colorArrayBuf ); // *************** *** 206,212 **** } ! glClientActiveTextureARB(TEXTURE0); ! glTexCoordPointer( 2, 0, textureArrayBuf); ! //gl.glEnableClientState( GL_TEXTURE_COORD_ARRAY); int pos = 0; --- 206,212 ---- } ! gl.glClientActiveTextureARB(TEXTURE0); ! gl.glTexCoordPointer( 2, 0, textureArrayBuf); ! //gl.gl.glEnableClientState( GL_TEXTURE_COORD_ARRAY); int pos = 0; *************** *** 245,249 **** } ! glDrawElements(mode, srcIndexBuf); pos += count; } --- 245,249 ---- } ! gl.glDrawElements(mode, srcIndexBuf); pos += count; } *************** *** 251,257 **** // PMM - added double damage shell 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 ) ! glEnable( GL_TEXTURE_2D ); ! glDisableClientState( GL_COLOR_ARRAY ); } --- 251,257 ---- // PMM - added double damage shell 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 ) ! gl.glEnable( GL_TEXTURE_2D ); ! gl.glDisableClientState( GL_COLOR_ARRAY ); } *************** *** 282,289 **** { count = -count; ! glBegin (GL_TRIANGLE_FAN); } else ! glBegin (GL_TRIANGLE_STRIP); do --- 282,289 ---- { count = -count; ! gl.glBegin (GL_TRIANGLE_FAN); } else ! gl.glBegin (GL_TRIANGLE_STRIP); do *************** *** 297,301 **** point[1] -= shadevector[1]*(point[2]+lheight); point[2] = height; ! glVertex3f(point[0], point[1], point[2]); orderIndex += 3; --- 297,301 ---- point[1] -= shadevector[1]*(point[2]+lheight); point[2] = height; ! gl.glVertex3f(point[0], point[1], point[2]); orderIndex += 3; *************** *** 303,307 **** } while (--count != 0); ! glEnd (); } } --- 303,307 ---- } while (--count != 0); ! gl.glEnd (); } } *************** *** 579,597 **** // if ( (currententity.flags & Defines.RF_DEPTHHACK) != 0) // hack the depth range to prevent view model from poking into walls ! glDepthRange(gldepthmin, gldepthmin + 0.3*(gldepthmax-gldepthmin)); if ( (currententity.flags & Defines.RF_WEAPONMODEL) != 0 && (r_lefthand.value == 1.0f) ) { ! glMatrixMode( GL_PROJECTION ); ! glPushMatrix(); ! glLoadIdentity(); ! glScalef( -1, 1, 1 ); MYgluPerspective( r_newrefdef.fov_y, ( float ) r_newrefdef.width / r_newrefdef.height, 4, 4096); ! glMatrixMode( GL_MODELVIEW ); ! glCullFace( GL_BACK ); } ! glPushMatrix (); e.angles[PITCH] = -e.angles[PITCH]; // sigh. R_RotateForEntity (e); --- 579,597 ---- // if ( (currententity.flags & Defines.RF_DEPTHHACK) != 0) // hack the depth range to prevent view model from poking into walls ! gl.glDepthRange(gldepthmin, gldepthmin + 0.3*(gldepthmax-gldepthmin)); if ( (currententity.flags & Defines.RF_WEAPONMODEL) != 0 && (r_lefthand.value == 1.0f) ) { ! gl.glMatrixMode( GL_PROJECTION ); ! gl.glPushMatrix(); ! gl.glLoadIdentity(); ! gl.glScalef( -1, 1, 1 ); MYgluPerspective( r_newrefdef.fov_y, ( float ) r_newrefdef.width / r_newrefdef.height, 4, 4096); ! gl.glMatrixMode( GL_MODELVIEW ); ! gl.glCullFace( GL_BACK ); } ! gl.glPushMatrix (); e.angles[PITCH] = -e.angles[PITCH]; // sigh. R_RotateForEntity (e); *************** *** 621,630 **** // draw it ! glShadeModel (GL_SMOOTH); GL_TexEnv( GL_MODULATE ); if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! glEnable (GL_BLEND); } --- 621,630 ---- // draw it ! gl.glShadeModel (GL_SMOOTH); GL_TexEnv( GL_MODULATE ); if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! gl.glEnable (GL_BLEND); } *************** *** 652,688 **** GL_TexEnv( GL_REPLACE ); ! glShadeModel (GL_FLAT); ! glPopMatrix (); if ( ( currententity.flags & Defines.RF_WEAPONMODEL ) != 0 && ( r_lefthand.value == 1.0F ) ) { ! glMatrixMode( GL_PROJECTION ); ! glPopMatrix(); ! glMatrixMode( GL_MODELVIEW ); ! glCullFace( GL_FRONT ); } if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! glDisable (GL_BLEND); } if ( (currententity.flags & Defines.RF_DEPTHHACK) != 0) ! glDepthRange (gldepthmin, gldepthmax); if ( gl_shadows.value != 0.0f && (currententity.flags & (Defines.RF_TRANSLUCENT | Defines.RF_WEAPONMODEL)) == 0) { ! glPushMatrix (); R_RotateForEntity (e); ! glDisable (GL_TEXTURE_2D); ! glEnable (GL_BLEND); ! glColor4f (0,0,0,0.5f); GL_DrawAliasShadow (paliashdr, currententity.frame ); ! glEnable (GL_TEXTURE_2D); ! glDisable (GL_BLEND); ! glPopMatrix (); } ! glColor4f (1,1,1,1); } } \ No newline at end of file --- 652,688 ---- GL_TexEnv( GL_REPLACE ); ! gl.glShadeModel (GL_FLAT); ! gl.glPopMatrix (); if ( ( currententity.flags & Defines.RF_WEAPONMODEL ) != 0 && ( r_lefthand.value == 1.0F ) ) { ! gl.glMatrixMode( GL_PROJECTION ); ! gl.glPopMatrix(); ! gl.glMatrixMode( GL_MODELVIEW ); ! gl.glCullFace( GL_FRONT ); } if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! gl.glDisable (GL_BLEND); } if ( (currententity.flags & Defines.RF_DEPTHHACK) != 0) ! gl.glDepthRange (gldepthmin, gldepthmax); if ( gl_shadows.value != 0.0f && (currententity.flags & (Defines.RF_TRANSLUCENT | Defines.RF_WEAPONMODEL)) == 0) { ! gl.glPushMatrix (); R_RotateForEntity (e); ! gl.glDisable (GL_TEXTURE_2D); ! gl.glEnable (GL_BLEND); ! gl.glColor4f (0,0,0,0.5f); GL_DrawAliasShadow (paliashdr, currententity.frame ); ! gl.glEnable (GL_TEXTURE_2D); ! gl.glDisable (GL_BLEND); ! gl.glPopMatrix (); } ! gl.glColor4f (1,1,1,1); } } \ No newline at end of file Index: Draw.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Draw.java,v retrieving revision 1.2.8.1... [truncated message content] |
From: Carsten W. <ca...@us...> - 2005-07-16 18:13:50
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8273/src/jake2/render Modified Files: Tag: render-refactoring DummyGL.java Log Message: new factory method Index: DummyGL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Attic/DummyGL.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** DummyGL.java 10 Jul 2005 17:51:01 -0000 1.1.2.1 --- DummyGL.java 16 Jul 2005 18:13:42 -0000 1.1.2.2 *************** *** 1,133 **** package jake2.render; - import jake2.render.lwjgl.LWJGLBase; - import java.nio.*; ! public class DummyGL extends LWJGLBase { ! protected void glAlphaFunc(int func, float ref) { // do nothing } ! protected void glBegin(int mode) { // do nothing } ! protected void glBindTexture(int target, int texture) { // do nothing } ! protected void glBlendFunc(int sfactor, int dfactor) { // do nothing } ! protected void glClear(int mask) { // do nothing } ! protected void glClearColor(float red, float green, float blue, float alpha) { // do nothing } ! protected void glColor3f(float red, float green, float blue) { // do nothing } ! protected void glColor3ub(byte red, byte green, byte blue) { // do nothing } ! protected void glColor4f(float red, float green, float blue, float alpha) { // do nothing } ! protected void glColor4ub(byte red, byte green, byte blue, byte alpha) { // do nothing } ! protected void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { // do nothing } ! protected void glColorPointer(int size, int stride, FloatBuffer pointer) { // do nothing } ! protected void glCullFace(int mode) { // do nothing } ! protected void glDeleteTextures(IntBuffer textures) { // do nothing } ! protected void glDepthFunc(int func) { // do nothing } ! protected void glDepthMask(boolean flag) { // do nothing } ! protected void glDepthRange(double zNear, double zFar) { // do nothing } ! protected void glDisable(int cap) { // do nothing } ! protected void glDisableClientState(int cap) { // do nothing } ! protected void glDrawArrays(int mode, int first, int count) { // do nothing } ! protected void glDrawBuffer(int mode) { // do nothing } ! protected void glDrawElements(int mode, IntBuffer indices) { // do nothing } ! protected void glEnable(int cap) { // do nothing } ! protected void glEnableClientState(int cap) { // do nothing } ! protected void glEnd() { // do nothing } ! protected void glFinish() { // do nothing } ! protected void glFlush() { // do nothing } ! protected void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { // do nothing } ! protected int glGetError() { return GL_NO_ERROR; } ! protected void glGetFloat(int pname, FloatBuffer params) { // do nothing } ! protected String glGetString(int name) { switch (name) { case GL_EXTENSIONS: --- 1,141 ---- package jake2.render; import java.nio.*; ! public class DummyGL implements QGL { ! private static QGL self = new DummyGL(); ! ! private DummyGL() { ! // singleton ! } ! ! public static QGL getInstance() { ! return self; ! } ! ! public void glAlphaFunc(int func, float ref) { // do nothing } ! public void glBegin(int mode) { // do nothing } ! public void glBindTexture(int target, int texture) { // do nothing } ! public void glBlendFunc(int sfactor, int dfactor) { // do nothing } ! public void glClear(int mask) { // do nothing } ! public void glClearColor(float red, float green, float blue, float alpha) { // do nothing } ! public void glColor3f(float red, float green, float blue) { // do nothing } ! public void glColor3ub(byte red, byte green, byte blue) { // do nothing } ! public void glColor4f(float red, float green, float blue, float alpha) { // do nothing } ! public void glColor4ub(byte red, byte green, byte blue, byte alpha) { // do nothing } ! public void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { // do nothing } ! public void glColorPointer(int size, int stride, FloatBuffer pointer) { // do nothing } ! public void glCullFace(int mode) { // do nothing } ! public void glDeleteTextures(IntBuffer textures) { // do nothing } ! public void glDepthFunc(int func) { // do nothing } ! public void glDepthMask(boolean flag) { // do nothing } ! public void glDepthRange(double zNear, double zFar) { // do nothing } ! public void glDisable(int cap) { // do nothing } ! public void glDisableClientState(int cap) { // do nothing } ! public void glDrawArrays(int mode, int first, int count) { // do nothing } ! public void glDrawBuffer(int mode) { // do nothing } ! public void glDrawElements(int mode, IntBuffer indices) { // do nothing } ! public void glEnable(int cap) { // do nothing } ! public void glEnableClientState(int cap) { // do nothing } ! public void glEnd() { // do nothing } ! public void glFinish() { // do nothing } ! public void glFlush() { // do nothing } ! public void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { // do nothing } ! public int glGetError() { return GL_NO_ERROR; } ! public void glGetFloat(int pname, FloatBuffer params) { // do nothing } ! public String glGetString(int name) { switch (name) { case GL_EXTENSIONS: *************** *** 138,217 **** } ! protected void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { // do nothing } ! protected void glLoadIdentity() { // do nothing } ! protected void glLoadMatrix(FloatBuffer m) { // do nothing } ! protected void glMatrixMode(int mode) { // do nothing } ! protected void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar) { // do nothing } ! protected void glPixelStorei(int pname, int param) { // do nothing } ! protected void glPointSize(float size) { // do nothing } ! protected void glPolygonMode(int face, int mode) { // do nothing } ! protected void glPopMatrix() { // do nothing } ! protected void glPushMatrix() { // do nothing } ! protected void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { // do nothing } ! protected void glRotatef(float angle, float x, float y, float z) { // do nothing } ! protected void glScalef(float x, float y, float z) { // do nothing } ! protected void glScissor(int x, int y, int width, int height) { // do nothing } ! protected void glShadeModel(int mode) { // do nothing } ! protected void glTexCoord2f(float s, float t) { // do nothing } ! protected void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { // do nothing } ! protected void glTexEnvi(int target, int pname, int param) { // do nothing } ! protected void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { --- 146,225 ---- } ! public void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { // do nothing } ! public void glLoadIdentity() { // do nothing } ! public void glLoadMatrix(FloatBuffer m) { // do nothing } ! public void glMatrixMode(int mode) { // do nothing } ! public void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar) { // do nothing } ! public void glPixelStorei(int pname, int param) { // do nothing } ! public void glPointSize(float size) { // do nothing } ! public void glPolygonMode(int face, int mode) { // do nothing } ! public void glPopMatrix() { // do nothing } ! public void glPushMatrix() { // do nothing } ! public void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { // do nothing } ! public void glRotatef(float angle, float x, float y, float z) { // do nothing } ! public void glScalef(float x, float y, float z) { // do nothing } ! public void glScissor(int x, int y, int width, int height) { // do nothing } ! public void glShadeModel(int mode) { // do nothing } ! public void glTexCoord2f(float s, float t) { // do nothing } ! public void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { // do nothing } ! public void glTexEnvi(int target, int pname, int param) { // do nothing } ! public void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { *************** *** 219,223 **** } ! protected void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { --- 227,231 ---- } ! public void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { *************** *** 225,237 **** } ! protected void glTexParameterf(int target, int pname, float param) { // do nothing } ! protected void glTexParameteri(int target, int pname, int param) { // do nothing } ! protected void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { --- 233,245 ---- } ! public void glTexParameterf(int target, int pname, float param) { // do nothing } ! public void glTexParameteri(int target, int pname, int param) { // do nothing } ! public void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { *************** *** 239,280 **** } ! protected void glTranslatef(float x, float y, float z) { // do nothing } ! protected void glVertex2f(float x, float y) { // do nothing } ! protected void glVertex3f(float x, float y, float z) { // do nothing } ! protected void glVertexPointer(int size, int stride, FloatBuffer pointer) { // do nothing } ! protected void glViewport(int x, int y, int width, int height) { // do nothing } ! protected void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { // do nothing } ! protected void glActiveTextureARB(int texture) { // do nothing } ! protected void glClientActiveTextureARB(int texture) { // do nothing } ! protected void glPointParameterEXT(int pname, FloatBuffer pfParams) { // do nothing } ! protected void glPointParameterfEXT(int pname, float param) { // do nothing } --- 247,304 ---- } ! public void glTranslatef(float x, float y, float z) { // do nothing } ! public void glVertex2f(float x, float y) { // do nothing } ! public void glVertex3f(float x, float y, float z) { // do nothing } ! public void glVertexPointer(int size, int stride, FloatBuffer pointer) { // do nothing } ! public void glViewport(int x, int y, int width, int height) { // do nothing } ! public void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { // do nothing } ! public void glActiveTextureARB(int texture) { // do nothing } ! public void glClientActiveTextureARB(int texture) { // do nothing } ! public void glPointParameterEXT(int pname, FloatBuffer pfParams) { // do nothing } ! public void glPointParameterfEXT(int pname, float param) { ! // do nothing ! } ! ! public void glLockArraysEXT(int first, int count) { ! // do nothing ! } ! ! public void glArrayElement(int index) { ! // do nothing ! } ! ! public void glUnlockArraysEXT() { ! // do nothing ! } ! ! public void glMultiTexCoord2f(int target, float s, float t) { // do nothing } |
From: Carsten W. <ca...@us...> - 2005-07-16 18:12:37
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7941/src/jake2/render Added Files: Tag: render-refactoring CountGL.java Log Message: this impl counts the OpenGL calls per frame (output after glFlush()) --- NEW FILE: CountGL.java --- package jake2.render; import java.nio.*; public class CountGL implements QGL { private static int count = 0; private static QGL self = new CountGL(); private CountGL() { // singleton } public static QGL getInstance() { return self; } public void glAlphaFunc(int func, float ref) { count++; } public void glBegin(int mode) { count++; } public void glBindTexture(int target, int texture) { count++; } public void glBlendFunc(int sfactor, int dfactor) { count++; } public void glClear(int mask) { count++; } public void glClearColor(float red, float green, float blue, float alpha) { count++; } public void glColor3f(float red, float green, float blue) { count++; } public void glColor3ub(byte red, byte green, byte blue) { count++; } public void glColor4f(float red, float green, float blue, float alpha) { count++; } public void glColor4ub(byte red, byte green, byte blue, byte alpha) { count++; } public void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { count++; } public void glColorPointer(int size, int stride, FloatBuffer pointer) { count++; } public void glCullFace(int mode) { count++; } public void glDeleteTextures(IntBuffer textures) { count++; } public void glDepthFunc(int func) { count++; } public void glDepthMask(boolean flag) { count++; } public void glDepthRange(double zNear, double zFar) { count++; } public void glDisable(int cap) { count++; } public void glDisableClientState(int cap) { count++; } public void glDrawArrays(int mode, int first, int count) { count++; } public void glDrawBuffer(int mode) { count++; } public void glDrawElements(int mode, IntBuffer indices) { count++; } public void glEnable(int cap) { count++; } public void glEnableClientState(int cap) { count++; } public void glEnd() { count++; } public void glFinish() { count++; } public void glFlush() { System.err.println("GL calls/frame: " + (++count)); count = 0; } public void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { count++; } public int glGetError() { return GL_NO_ERROR; } public void glGetFloat(int pname, FloatBuffer params) { count++; } public String glGetString(int name) { switch (name) { case GL_EXTENSIONS: return "GL_ARB_multitexture"; default: return ""; } } public void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { count++; } public void glLoadIdentity() { count++; } public void glLoadMatrix(FloatBuffer m) { count++; } public void glMatrixMode(int mode) { count++; } public void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar) { count++; } public void glPixelStorei(int pname, int param) { count++; } public void glPointSize(float size) { count++; } public void glPolygonMode(int face, int mode) { count++; } public void glPopMatrix() { count++; } public void glPushMatrix() { count++; } public void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { count++; } public void glRotatef(float angle, float x, float y, float z) { count++; } public void glScalef(float x, float y, float z) { count++; } public void glScissor(int x, int y, int width, int height) { count++; } public void glShadeModel(int mode) { count++; } public void glTexCoord2f(float s, float t) { count++; } public void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { count++; } public void glTexEnvi(int target, int pname, int param) { count++; } public void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { count++; } public void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { count++; } public void glTexParameterf(int target, int pname, float param) { count++; } public void glTexParameteri(int target, int pname, int param) { count++; } public void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { count++; } public void glTranslatef(float x, float y, float z) { count++; } public void glVertex2f(float x, float y) { count++; } public void glVertex3f(float x, float y, float z) { count++; } public void glVertexPointer(int size, int stride, FloatBuffer pointer) { count++; } public void glViewport(int x, int y, int width, int height) { count++; } public void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { count++; } public void glActiveTextureARB(int texture) { count++; } public void glClientActiveTextureARB(int texture) { count++; } public void glPointParameterEXT(int pname, FloatBuffer pfParams) { count++; } public void glPointParameterfEXT(int pname, float param) { count++; } public void glLockArraysEXT(int first, int count) { count++; } public void glArrayElement(int index) { count++; } public void glUnlockArraysEXT() { count++; } public void glMultiTexCoord2f(int target, float s, float t) { count++; } } |
From: Carsten W. <ca...@us...> - 2005-07-16 18:01:50
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5969/src/jake2/render Modified Files: Tag: render-refactoring LWJGLRenderer.java Log Message: extends the LWJGLBase Index: LWJGLRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/LWJGLRenderer.java,v retrieving revision 1.3.6.1 retrieving revision 1.3.6.2 diff -C2 -d -r1.3.6.1 -r1.3.6.2 *** LWJGLRenderer.java 10 Jul 2005 17:57:34 -0000 1.3.6.1 --- LWJGLRenderer.java 16 Jul 2005 18:01:36 -0000 1.3.6.2 *************** *** 40,44 **** * @author dsanders/cwei */ ! final class LWJGLRenderer extends LwjglGL implements refexport_t, Ref { private LWJGLKBD kbd=new LWJGLKBD(); --- 40,44 ---- * @author dsanders/cwei */ ! final class LWJGLRenderer extends LWJGLBase implements refexport_t, Ref { private LWJGLKBD kbd=new LWJGLKBD(); |
From: Carsten W. <ca...@us...> - 2005-07-16 17:59:46
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5402/src/jake2/render Modified Files: Tag: render-refactoring LwjglGL.java Log Message: implementation of QGL Index: LwjglGL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Attic/LwjglGL.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** LwjglGL.java 10 Jul 2005 17:51:01 -0000 1.1.2.1 --- LwjglGL.java 16 Jul 2005 17:59:37 -0000 1.1.2.2 *************** *** 7,11 **** import org.lwjgl.util.GL; ! public class LwjglGL extends LWJGLBase { public final void glAlphaFunc(int func, float ref) { --- 7,21 ---- import org.lwjgl.util.GL; ! public class LwjglGL implements QGL { ! ! private static QGL self = new LwjglGL(); ! ! private LwjglGL() { ! // singleton ! } ! ! public static QGL getInstance() { ! return self; ! } public final void glAlphaFunc(int func, float ref) { *************** *** 280,282 **** --- 290,308 ---- } + public final void glLockArraysEXT(int first, int count) { + GL.glLockArraysEXT(first, count); + } + + public final void glArrayElement(int index) { + GL.glArrayElement(index); + } + + public final void glUnlockArraysEXT() { + GL.glUnlockArraysEXT(); + } + + public final void glMultiTexCoord2f(int target, float s, float t) { + GL.glMultiTexCoord2f(target, s, t); + } + } |
From: Carsten W. <ca...@us...> - 2005-07-16 17:58:04
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5162/src/jake2/render Modified Files: Tag: render-refactoring QGL.java Log Message: this is now an interface Index: QGL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Attic/QGL.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QGL.java 10 Jul 2005 17:51:01 -0000 1.1.2.1 --- QGL.java 16 Jul 2005 17:57:52 -0000 1.1.2.2 *************** *** 3,459 **** import java.nio.*; ! public abstract class QGL { ! ! /* ! * alpha functions ! */ ! public static final int GL_NEVER = 0x0200; ! ! public static final int GL_LESS = 0x0201; ! ! public static final int GL_EQUAL = 0x0202; ! ! public static final int GL_LEQUAL = 0x0203; ! ! public static final int GL_GREATER = 0x0204; ! ! public static final int GL_NOTEQUAL = 0x0205; ! ! public static final int GL_GEQUAL = 0x0206; ! ! public static final int GL_ALWAYS = 0x0207; ! ! /* ! * attribute masks ! */ ! public static final int GL_DEPTH_BUFFER_BIT = 0x00000100; ! ! public static final int GL_STENCIL_BUFFER_BIT = 0x00000400; ! ! public static final int GL_COLOR_BUFFER_BIT = 0x00004000; ! ! /* ! * begin modes ! */ ! public static final int GL_POINTS = 0x0000; ! ! public static final int GL_LINES = 0x0001; ! ! public static final int GL_LINE_LOOP = 0x0002; ! ! public static final int GL_LINE_STRIP = 0x0003; ! ! public static final int GL_TRIANGLES = 0x0004; ! ! public static final int GL_TRIANGLE_STRIP = 0x0005; ! ! public static final int GL_TRIANGLE_FAN = 0x0006; ! ! public static final int GL_QUADS = 0x0007; ! ! public static final int GL_QUAD_STRIP = 0x0008; ! ! public static final int GL_POLYGON = 0x0009; ! ! /* ! * blending factors ! */ ! public static final int GL_ZERO = 0; ! ! public static final int GL_ONE = 1; ! ! public static final int GL_SRC_COLOR = 0x0300; ! ! public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301; ! ! public static final int GL_SRC_ALPHA = 0x0302; ! ! public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303; ! ! public static final int GL_DST_ALPHA = 0x0304; ! ! public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305; ! ! /* ! * boolean ! */ ! public static final int GL_TRUE = 1; ! ! public static final int GL_FALSE = 0; ! ! /* ! * data types ! */ ! public static final int GL_BYTE = 0x1400; ! ! public static final int GL_UNSIGNED_BYTE = 0x1401; ! ! public static final int GL_SHORT = 0x1402; ! ! public static final int GL_UNSIGNED_SHORT = 0x1403; ! ! public static final int GL_INT = 0x1404; ! ! public static final int GL_UNSIGNED_INT = 0x1405; ! ! public static final int GL_FLOAT = 0x1406; ! ! /* ! * draw buffer modes ! */ ! public static final int GL_FRONT = 0x0404; ! ! public static final int GL_BACK = 0x0405; ! ! public static final int GL_FRONT_AND_BACK = 0x0408; ! ! /* ! * errors ! */ ! public static final int GL_NO_ERROR = 0; ! ! public static final int GL_POINT_SMOOTH = 0x0B10; ! ! public static final int GL_CULL_FACE = 0x0B44; ! ! public static final int GL_DEPTH_TEST = 0x0B71; ! ! public static final int GL_MODELVIEW_MATRIX = 0x0BA6; ! ! public static final int GL_ALPHA_TEST = 0x0BC0; ! ! public static final int GL_BLEND = 0x0BE2; ! ! public static final int GL_SCISSOR_TEST = 0x0C11; ! ! public static final int GL_PACK_ALIGNMENT = 0x0D05; ! ! public static final int GL_TEXTURE_2D = 0x0DE1; ! ! /* ! * hint modes ! */ ! public static final int GL_DONT_CARE = 0x1100; ! ! public static final int GL_FASTEST = 0x1101; ! ! public static final int GL_NICEST = 0x1102; ! ! /* ! * matrix modes ! */ ! public static final int GL_MODELVIEW = 0x1700; ! ! public static final int GL_PROJECTION = 0x1701; ! ! /* ! * pixel formats ! */ ! public static final int GL_COLOR_INDEX = 0x1900; ! ! public static final int GL_RED = 0x1903; ! ! public static final int GL_GREEN = 0x1904; ! ! public static final int GL_BLUE = 0x1905; ! ! public static final int GL_ALPHA = 0x1906; ! ! public static final int GL_RGB = 0x1907; ! ! public static final int GL_RGBA = 0x1908; ! ! public static final int GL_LUMINANCE = 0x1909; ! ! public static final int GL_LUMINANCE_ALPHA = 0x190A; ! ! /* ! * polygon modes ! */ ! ! public static final int GL_POINT = 0x1B00; ! ! public static final int GL_LINE = 0x1B01; ! ! public static final int GL_FILL = 0x1B02; ! ! /* ! * shading models ! */ ! public static final int GL_FLAT = 0x1D00; ! ! public static final int GL_SMOOTH = 0x1D01; ! ! public static final int GL_REPLACE = 0x1E01; ! ! /* ! * string names ! */ ! public static final int GL_VENDOR = 0x1F00; ! ! public static final int GL_RENDERER = 0x1F01; ! ! public static final int GL_VERSION = 0x1F02; ! ! public static final int GL_EXTENSIONS = 0x1F03; ! ! /* ! * TextureEnvMode ! */ ! public static final int GL_MODULATE = 0x2100; ! ! /* ! * TextureEnvParameter ! */ ! public static final int GL_TEXTURE_ENV_MODE = 0x2200; ! ! public static final int GL_TEXTURE_ENV_COLOR = 0x2201; ! ! /* ! * TextureEnvTarget ! */ ! public static final int GL_TEXTURE_ENV = 0x2300; ! ! public static final int GL_NEAREST = 0x2600; ! ! public static final int GL_LINEAR = 0x2601; ! ! public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700; ! ! public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701; ! ! public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702; ! ! public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703; ! ! /* ! * TextureParameterName ! */ ! public static final int GL_TEXTURE_MAG_FILTER = 0x2800; ! ! public static final int GL_TEXTURE_MIN_FILTER = 0x2801; ! ! public static final int GL_TEXTURE_WRAP_S = 0x2802; ! ! public static final int GL_TEXTURE_WRAP_T = 0x2803; ! ! /* ! * TextureWrapMode ! */ ! public static final int GL_CLAMP = 0x2900; ! ! public static final int GL_REPEAT = 0x2901; ! ! /* ! * texture ! */ ! public static final int GL_LUMINANCE8 = 0x8040; ! ! public static final int GL_INTENSITY8 = 0x804B; ! ! public static final int GL_R3_G3_B2 = 0x2A10; ! ! public static final int GL_RGB4 = 0x804F; ! ! public static final int GL_RGB5 = 0x8050; ! ! public static final int GL_RGB8 = 0x8051; ! ! public static final int GL_RGBA2 = 0x8055; ! ! public static final int GL_RGBA4 = 0x8056; ! ! public static final int GL_RGB5_A1 = 0x8057; ! ! public static final int GL_RGBA8 = 0x8058; ! ! /* ! * vertex arrays ! */ ! public static final int GL_VERTEX_ARRAY = 0x8074; ! ! public static final int GL_COLOR_ARRAY = 0x8076; ! ! public static final int GL_TEXTURE_COORD_ARRAY = 0x8078; ! ! public static final int GL_T2F_V3F = 0x2A27; ! ! /* ! * OpenGL 1.2, 1.3 constants ! */ ! public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; ! ! public static final int GL_TEXTURE0 = 0x84C0; ! ! public static final int GL_TEXTURE1 = 0x84C1; ! ! public static final int GL_TEXTURE0_ARB = 0x84C0; ! ! public static final int GL_TEXTURE1_ARB = 0x84C1; ! ! public static final int GL_BGR = 0x80E0; ! ! public static final int GL_BGRA = 0x80E1; /* ! * point parameters */ - public static final int GL_POINT_SIZE_MIN_EXT = 0x8126; ! public static final int GL_POINT_SIZE_MAX_EXT = 0x8127; ! public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128; ! public static final int GL_DISTANCE_ATTENUATION_EXT = 0x8129; ! /* ! * a sub set of OpenGL for Jake2 ! */ ! protected abstract void glAlphaFunc(int func, float ref); ! protected abstract void glBegin(int mode); ! protected abstract void glBindTexture(int target, int texture); ! protected abstract void glBlendFunc(int sfactor, int dfactor); ! protected abstract void glClear(int mask); ! protected abstract void glClearColor(float red, float green, float blue, ! float alpha); ! protected abstract void glColor3f(float red, float green, float blue); ! protected abstract void glColor3ub(byte red, byte green, byte blue); ! protected abstract void glColor4f(float red, float green, float blue, ! float alpha); ! protected abstract void glColor4ub(byte red, byte green, byte blue, ! byte alpha); ! protected abstract void glColorPointer(int size, boolean unsigned, ! int stride, ByteBuffer pointer); ! protected abstract void glColorPointer(int size, int stride, ! FloatBuffer pointer); ! protected abstract void glCullFace(int mode); ! protected abstract void glDeleteTextures(IntBuffer textures); ! protected abstract void glDepthFunc(int func); ! protected abstract void glDepthMask(boolean flag); ! protected abstract void glDepthRange(double zNear, double zFar); ! protected abstract void glDisable(int cap); ! protected abstract void glDisableClientState(int cap); ! protected abstract void glDrawArrays(int mode, int first, int count); ! protected abstract void glDrawBuffer(int mode); ! protected abstract void glDrawElements(int mode, IntBuffer indices); ! protected abstract void glEnable(int cap); ! protected abstract void glEnableClientState(int cap); ! protected abstract void glEnd(); ! protected abstract void glFinish(); ! protected abstract void glFlush(); ! protected abstract void glFrustum(double left, double right, double bottom, ! double top, double zNear, double zFar); ! protected abstract int glGetError(); ! protected abstract void glGetFloat(int pname, FloatBuffer params); ! protected abstract String glGetString(int name); ! protected abstract void glInterleavedArrays(int format, int stride, ! FloatBuffer pointer); ! protected abstract void glLoadIdentity(); ! protected abstract void glLoadMatrix(FloatBuffer m); ! protected abstract void glMatrixMode(int mode); ! protected abstract void glOrtho(double left, double right, double bottom, ! double top, double zNear, double zFar); ! protected abstract void glPixelStorei(int pname, int param); ! protected abstract void glPointSize(float size); ! protected abstract void glPolygonMode(int face, int mode); ! protected abstract void glPopMatrix(); ! protected abstract void glPushMatrix(); ! protected abstract void glReadPixels(int x, int y, int width, int height, ! int format, int type, ByteBuffer pixels); ! protected abstract void glRotatef(float angle, float x, float y, float z); ! protected abstract void glScalef(float x, float y, float z); ! protected abstract void glScissor(int x, int y, int width, int height); ! protected abstract void glShadeModel(int mode); ! protected abstract void glTexCoord2f(float s, float t); ! protected abstract void glTexCoordPointer(int size, int stride, ! FloatBuffer pointer); ! protected abstract void glTexEnvi(int target, int pname, int param); ! protected abstract void glTexImage2D(int target, int level, ! int internalformat, int width, int height, int border, int format, ! int type, ByteBuffer pixels); ! protected abstract void glTexImage2D(int target, int level, ! int internalformat, int width, int height, int border, int format, ! int type, IntBuffer pixels); ! protected abstract void glTexParameterf(int target, int pname, float param); ! protected abstract void glTexParameteri(int target, int pname, int param); ! protected abstract void glTexSubImage2D(int target, int level, int xoffset, ! int yoffset, int width, int height, int format, int type, ! IntBuffer pixels); ! protected abstract void glTranslatef(float x, float y, float z); ! protected abstract void glVertex2f(float x, float y); ! protected abstract void glVertex3f(float x, float y, float z); ! protected abstract void glVertexPointer(int size, int stride, ! FloatBuffer pointer); ! protected abstract void glViewport(int x, int y, int width, int height); ! protected abstract void glColorTable(int target, int internalFormat, ! int width, int format, int type, ByteBuffer data); ! protected abstract void glActiveTextureARB(int texture); ! protected abstract void glClientActiveTextureARB(int texture); ! protected abstract void glPointParameterEXT(int pname, FloatBuffer pfParams); ! protected abstract void glPointParameterfEXT(int pname, float param); } \ No newline at end of file --- 3,155 ---- import java.nio.*; ! public interface QGL extends QGLConst { /* ! * a sub set of OpenGL for Jake2 */ ! void glAlphaFunc(int func, float ref); ! void glBegin(int mode); ! void glBindTexture(int target, int texture); ! void glBlendFunc(int sfactor, int dfactor); ! void glClear(int mask); ! void glClearColor(float red, float green, float blue, float alpha); ! void glColor3f(float red, float green, float blue); ! void glColor3ub(byte red, byte green, byte blue); ! void glColor4f(float red, float green, float blue, float alpha); ! void glColor4ub(byte red, byte green, byte blue, byte alpha); ! void glColorPointer(int size, boolean unsigned, int stride, ! ByteBuffer pointer); ! void glColorPointer(int size, int stride, FloatBuffer pointer); ! void glCullFace(int mode); ! void glDeleteTextures(IntBuffer textures); ! void glDepthFunc(int func); ! void glDepthMask(boolean flag); ! void glDepthRange(double zNear, double zFar); ! void glDisable(int cap); ! void glDisableClientState(int cap); ! void glDrawArrays(int mode, int first, int count); ! void glDrawBuffer(int mode); ! void glDrawElements(int mode, IntBuffer indices); ! void glEnable(int cap); ! void glEnableClientState(int cap); ! void glEnd(); ! void glFinish(); ! void glFlush(); ! void glFrustum(double left, double right, double bottom, double top, ! double zNear, double zFar); ! int glGetError(); ! void glGetFloat(int pname, FloatBuffer params); ! String glGetString(int name); ! void glInterleavedArrays(int format, int stride, FloatBuffer pointer); ! void glLoadIdentity(); ! void glLoadMatrix(FloatBuffer m); ! void glMatrixMode(int mode); ! void glOrtho(double left, double right, double bottom, double top, ! double zNear, double zFar); ! void glPixelStorei(int pname, int param); ! void glPointSize(float size); ! void glPolygonMode(int face, int mode); ! void glPopMatrix(); ! void glPushMatrix(); ! void glReadPixels(int x, int y, int width, int height, int format, ! int type, ByteBuffer pixels); ! void glRotatef(float angle, float x, float y, float z); ! void glScalef(float x, float y, float z); ! void glScissor(int x, int y, int width, int height); ! void glShadeModel(int mode); ! void glTexCoord2f(float s, float t); ! void glTexCoordPointer(int size, int stride, FloatBuffer pointer); ! void glTexEnvi(int target, int pname, int param); ! void glTexImage2D(int target, int level, int internalformat, int width, ! int height, int border, int format, int type, ByteBuffer pixels); ! void glTexImage2D(int target, int level, int internalformat, int width, ! int height, int border, int format, int type, IntBuffer pixels); ! void glTexParameterf(int target, int pname, float param); ! void glTexParameteri(int target, int pname, int param); ! void glTexSubImage2D(int target, int level, int xoffset, int yoffset, ! int width, int height, int format, int type, IntBuffer pixels); ! void glTranslatef(float x, float y, float z); ! void glVertex2f(float x, float y); ! void glVertex3f(float x, float y, float z); ! void glVertexPointer(int size, int stride, FloatBuffer pointer); ! void glViewport(int x, int y, int width, int height); ! void glColorTable(int target, int internalFormat, int width, int format, ! int type, ByteBuffer data); ! void glActiveTextureARB(int texture); ! void glClientActiveTextureARB(int texture); ! void glPointParameterEXT(int pname, FloatBuffer pfParams); ! void glPointParameterfEXT(int pname, float param); ! void glLockArraysEXT(int first, int count); ! void glArrayElement(int index); ! void glUnlockArraysEXT(); ! void glMultiTexCoord2f(int target, float s, float t); } \ No newline at end of file |
From: Carsten W. <ca...@us...> - 2005-07-16 17:56:18
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5012/src/jake2/render Added Files: Tag: render-refactoring QGLConst.java Log Message: GL constants --- NEW FILE: QGLConst.java --- package jake2.render; public interface QGLConst { /* * alpha functions */ public static final int GL_NEVER = 0x0200; public static final int GL_LESS = 0x0201; public static final int GL_EQUAL = 0x0202; public static final int GL_LEQUAL = 0x0203; public static final int GL_GREATER = 0x0204; public static final int GL_NOTEQUAL = 0x0205; public static final int GL_GEQUAL = 0x0206; public static final int GL_ALWAYS = 0x0207; /* * attribute masks */ public static final int GL_DEPTH_BUFFER_BIT = 0x00000100; public static final int GL_STENCIL_BUFFER_BIT = 0x00000400; public static final int GL_COLOR_BUFFER_BIT = 0x00004000; /* * begin modes */ public static final int GL_POINTS = 0x0000; public static final int GL_LINES = 0x0001; public static final int GL_LINE_LOOP = 0x0002; public static final int GL_LINE_STRIP = 0x0003; public static final int GL_TRIANGLES = 0x0004; public static final int GL_TRIANGLE_STRIP = 0x0005; public static final int GL_TRIANGLE_FAN = 0x0006; public static final int GL_QUADS = 0x0007; public static final int GL_QUAD_STRIP = 0x0008; public static final int GL_POLYGON = 0x0009; /* * blending factors */ public static final int GL_ZERO = 0; public static final int GL_ONE = 1; public static final int GL_SRC_COLOR = 0x0300; public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301; public static final int GL_SRC_ALPHA = 0x0302; public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303; public static final int GL_DST_ALPHA = 0x0304; public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305; /* * boolean */ public static final int GL_TRUE = 1; public static final int GL_FALSE = 0; /* * data types */ public static final int GL_BYTE = 0x1400; public static final int GL_UNSIGNED_BYTE = 0x1401; public static final int GL_SHORT = 0x1402; public static final int GL_UNSIGNED_SHORT = 0x1403; public static final int GL_INT = 0x1404; public static final int GL_UNSIGNED_INT = 0x1405; public static final int GL_FLOAT = 0x1406; /* * draw buffer modes */ public static final int GL_FRONT = 0x0404; public static final int GL_BACK = 0x0405; public static final int GL_FRONT_AND_BACK = 0x0408; /* * errors */ public static final int GL_NO_ERROR = 0; public static final int GL_POINT_SMOOTH = 0x0B10; public static final int GL_CULL_FACE = 0x0B44; public static final int GL_DEPTH_TEST = 0x0B71; public static final int GL_MODELVIEW_MATRIX = 0x0BA6; public static final int GL_ALPHA_TEST = 0x0BC0; public static final int GL_BLEND = 0x0BE2; public static final int GL_SCISSOR_TEST = 0x0C11; public static final int GL_PACK_ALIGNMENT = 0x0D05; public static final int GL_TEXTURE_2D = 0x0DE1; /* * hint modes */ public static final int GL_DONT_CARE = 0x1100; public static final int GL_FASTEST = 0x1101; public static final int GL_NICEST = 0x1102; /* * matrix modes */ public static final int GL_MODELVIEW = 0x1700; public static final int GL_PROJECTION = 0x1701; /* * pixel formats */ public static final int GL_COLOR_INDEX = 0x1900; public static final int GL_RED = 0x1903; public static final int GL_GREEN = 0x1904; public static final int GL_BLUE = 0x1905; public static final int GL_ALPHA = 0x1906; public static final int GL_RGB = 0x1907; public static final int GL_RGBA = 0x1908; public static final int GL_LUMINANCE = 0x1909; public static final int GL_LUMINANCE_ALPHA = 0x190A; /* * polygon modes */ public static final int GL_POINT = 0x1B00; public static final int GL_LINE = 0x1B01; public static final int GL_FILL = 0x1B02; /* * shading models */ public static final int GL_FLAT = 0x1D00; public static final int GL_SMOOTH = 0x1D01; public static final int GL_REPLACE = 0x1E01; /* * string names */ public static final int GL_VENDOR = 0x1F00; public static final int GL_RENDERER = 0x1F01; public static final int GL_VERSION = 0x1F02; public static final int GL_EXTENSIONS = 0x1F03; /* * TextureEnvMode */ public static final int GL_MODULATE = 0x2100; /* * TextureEnvParameter */ public static final int GL_TEXTURE_ENV_MODE = 0x2200; public static final int GL_TEXTURE_ENV_COLOR = 0x2201; /* * TextureEnvTarget */ public static final int GL_TEXTURE_ENV = 0x2300; public static final int GL_NEAREST = 0x2600; public static final int GL_LINEAR = 0x2601; public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700; public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701; public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702; public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703; /* * TextureParameterName */ public static final int GL_TEXTURE_MAG_FILTER = 0x2800; public static final int GL_TEXTURE_MIN_FILTER = 0x2801; public static final int GL_TEXTURE_WRAP_S = 0x2802; public static final int GL_TEXTURE_WRAP_T = 0x2803; /* * TextureWrapMode */ public static final int GL_CLAMP = 0x2900; public static final int GL_REPEAT = 0x2901; /* * texture */ public static final int GL_LUMINANCE8 = 0x8040; public static final int GL_INTENSITY8 = 0x804B; public static final int GL_R3_G3_B2 = 0x2A10; public static final int GL_RGB4 = 0x804F; public static final int GL_RGB5 = 0x8050; public static final int GL_RGB8 = 0x8051; public static final int GL_RGBA2 = 0x8055; public static final int GL_RGBA4 = 0x8056; public static final int GL_RGB5_A1 = 0x8057; public static final int GL_RGBA8 = 0x8058; /* * vertex arrays */ public static final int GL_VERTEX_ARRAY = 0x8074; public static final int GL_COLOR_ARRAY = 0x8076; public static final int GL_TEXTURE_COORD_ARRAY = 0x8078; public static final int GL_T2F_V3F = 0x2A27; /* * OpenGL 1.2, 1.3 constants */ public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; public static final int GL_TEXTURE0 = 0x84C0; public static final int GL_TEXTURE1 = 0x84C1; public static final int GL_TEXTURE0_ARB = 0x84C0; public static final int GL_TEXTURE1_ARB = 0x84C1; public static final int GL_BGR = 0x80E0; public static final int GL_BGRA = 0x80E1; /* * point parameters */ public static final int GL_POINT_SIZE_MIN_EXT = 0x8126; public static final int GL_POINT_SIZE_MAX_EXT = 0x8127; public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128; public static final int GL_DISTANCE_ATTENUATION_EXT = 0x8129; } |
From: Carsten W. <ca...@us...> - 2005-07-10 17:57:44
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19948/src/jake2/render Modified Files: Tag: render-refactoring JoglRenderer.java LWJGLRenderer.java JoglBase.java FastJoglRenderer.java Log Message: all renderers are using the same code path (currently experimental) Index: JoglRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglRenderer.java,v retrieving revision 1.6 retrieving revision 1.6.8.1 diff -C2 -d -r1.6 -r1.6.8.1 *** JoglRenderer.java 14 Dec 2004 00:11:03 -0000 1.6 --- JoglRenderer.java 10 Jul 2005 17:57:34 -0000 1.6.8.1 *************** *** 30,34 **** import jake2.client.refexport_t; import jake2.qcommon.xcommand_t; - import jake2.render.jogl.Misc; import jake2.sys.JOGLKBD; import jake2.sys.KBD; --- 30,33 ---- *************** *** 41,45 **** * @author cwei */ ! final class JoglRenderer extends Misc implements refexport_t, Ref { private JOGLKBD kbd=new JOGLKBD(); --- 40,44 ---- * @author cwei */ ! final class JoglRenderer extends JoglGL implements refexport_t, Ref { private JOGLKBD kbd=new JOGLKBD(); *************** *** 65,69 **** public boolean Init(int vid_xpos, int vid_ypos) { // pre init ! if (!R_Init(vid_xpos, vid_ypos)) return false; // calls the R_Init2() internally updateScreen(); --- 64,68 ---- public boolean Init(int vid_xpos, int vid_ypos) { // pre init ! if (!R_Init()) return false; // calls the R_Init2() internally updateScreen(); Index: FastJoglRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/FastJoglRenderer.java,v retrieving revision 1.4 retrieving revision 1.4.8.1 diff -C2 -d -r1.4 -r1.4.8.1 *** FastJoglRenderer.java 14 Dec 2004 00:11:09 -0000 1.4 --- FastJoglRenderer.java 10 Jul 2005 17:57:34 -0000 1.4.8.1 *************** *** 29,33 **** import jake2.client.*; import jake2.qcommon.xcommand_t; ! import jake2.render.fastjogl.Misc; import jake2.sys.JOGLKBD; import jake2.sys.KBD; --- 29,33 ---- import jake2.client.*; import jake2.qcommon.xcommand_t; ! import jake2.render.JoglGL; import jake2.sys.JOGLKBD; import jake2.sys.KBD; *************** *** 40,44 **** * @author cwei */ ! final class FastJoglRenderer extends Misc implements refexport_t, Ref { private JOGLKBD kbd=new JOGLKBD(); --- 40,44 ---- * @author cwei */ ! final class FastJoglRenderer extends JoglGL implements refexport_t, Ref { private JOGLKBD kbd=new JOGLKBD(); *************** *** 65,69 **** // pre init ! if (!R_Init(vid_xpos, vid_ypos)) return false; // calls the R_Init2() internally updateScreen(); --- 65,69 ---- // pre init ! if (!R_Init()) return false; // calls the R_Init2() internally updateScreen(); Index: LWJGLRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/LWJGLRenderer.java,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** LWJGLRenderer.java 20 Dec 2004 21:49:14 -0000 1.3 --- LWJGLRenderer.java 10 Jul 2005 17:57:34 -0000 1.3.6.1 *************** *** 28,31 **** --- 28,32 ---- import jake2.Defines; import jake2.client.*; + import jake2.render.lwjgl.LWJGLBase; import jake2.render.lwjgl.Misc; import jake2.sys.KBD; *************** *** 39,43 **** * @author dsanders/cwei */ ! final class LWJGLRenderer extends Misc implements refexport_t, Ref { private LWJGLKBD kbd=new LWJGLKBD(); --- 40,44 ---- * @author dsanders/cwei */ ! final class LWJGLRenderer extends LwjglGL implements refexport_t, Ref { private LWJGLKBD kbd=new LWJGLKBD(); Index: JoglBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglBase.java,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -d -r1.15 -r1.15.2.1 *** JoglBase.java 26 Jun 2005 08:51:19 -0000 1.15 --- JoglBase.java 10 Jul 2005 17:57:34 -0000 1.15.2.1 *************** *** 29,36 **** import jake2.Defines; import jake2.client.VID; - import jake2.client.viddef_t; - import jake2.game.cvar_t; import jake2.qcommon.Cbuf; import jake2.qcommon.xcommand_t; import jake2.sys.JOGLKBD; --- 29,35 ---- import jake2.Defines; import jake2.client.VID; import jake2.qcommon.Cbuf; import jake2.qcommon.xcommand_t; + import jake2.render.lwjgl.Misc; import jake2.sys.JOGLKBD; *************** *** 49,53 **** * JoglCommon */ ! public abstract class JoglBase implements GLEventListener { // IMPORTED FUNCTIONS --- 48,52 ---- * JoglCommon */ ! public abstract class JoglBase extends Misc implements GLEventListener { // IMPORTED FUNCTIONS *************** *** 57,72 **** JFrame window; ! protected GL gl; ! protected GLU glu; ! protected GLUT glut = new GLUT(); // window position on the screen int window_xpos, window_ypos; - protected viddef_t vid = new viddef_t(); // handles the post initialization with JoglRenderer ! protected boolean post_init = false; ! protected boolean contextInUse = false; ! protected abstract boolean R_Init2(); protected final xcommand_t INIT_CALLBACK = new xcommand_t() { --- 56,69 ---- JFrame window; ! GL gl; ! GLU glu; ! GLUT glut = new GLUT(); // window position on the screen int window_xpos, window_ypos; // handles the post initialization with JoglRenderer ! boolean post_init = false; ! boolean contextInUse = false; protected final xcommand_t INIT_CALLBACK = new xcommand_t() { *************** *** 74,79 **** // only used for the first run (initialization) // clear the screen ! gl.glClearColor(0, 0, 0, 0); ! gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); // --- 71,76 ---- // only used for the first run (initialization) // clear the screen ! glClearColor(0, 0, 0, 0); ! glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // *************** *** 87,100 **** } }; ! protected xcommand_t callback = INIT_CALLBACK; - protected cvar_t vid_fullscreen; - - // enum rserr_t - protected static final int rserr_ok = 0; - protected static final int rserr_invalid_fullscreen = 1; - protected static final int rserr_invalid_mode = 2; - protected static final int rserr_unknown = 3; - public DisplayMode[] getModeList() { DisplayMode[] modes = device.getDisplayModes(); --- 84,90 ---- } }; ! ! xcommand_t callback = INIT_CALLBACK; public DisplayMode[] getModeList() { DisplayMode[] modes = device.getDisplayModes(); *************** *** 308,333 **** protected void GLimp_EndFrame() { ! gl.glFlush(); canvas.swapBuffers(); } - protected void GLimp_BeginFrame(float camera_separation) { - // do nothing - } - - protected void GLimp_AppActivate(boolean activate) { - // do nothing - } ! protected void GLimp_EnableLogging(boolean enable) { ! // doesn't need jogl logging ! // do nothing ! } ! ! protected void GLimp_LogNewFrame() { ! // doesn't need jogl logging ! // do nothing ! } ! ! /* * @see jake2.client.refexport_t#updateScreen() */ --- 298,306 ---- protected void GLimp_EndFrame() { ! glFlush(); canvas.swapBuffers(); } ! /* * @see jake2.client.refexport_t#updateScreen() */ |
From: Carsten W. <ca...@us...> - 2005-07-10 17:56:00
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18867/src/jake2/render/lwjgl Modified Files: Tag: render-refactoring Main.java Draw.java Warp.java Model.java Light.java Misc.java Surf.java LWJGLBase.java Mesh.java Image.java Base.java Log Message: modifications to use the QGL interface. all lwjgl specific code is removed Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Image.java,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** Image.java 7 May 2005 17:31:37 -0000 1.3 --- Image.java 10 Jul 2005 17:55:51 -0000 1.3.6.1 *************** *** 42,49 **** import java.util.Arrays; - import org.lwjgl.BufferUtils; - import org.lwjgl.opengl.EXTSharedTexturePalette; - import org.lwjgl.opengl.GL11; - /** * Image --- 42,45 ---- *************** *** 76,81 **** int gl_tex_alpha_format = 4; ! int gl_filter_min = GL11.GL_LINEAR_MIPMAP_NEAREST; ! int gl_filter_max = GL11.GL_LINEAR; Image() { --- 72,77 ---- int gl_tex_alpha_format = 4; ! int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST; ! int gl_filter_max = GL_LINEAR; Image() { *************** *** 97,101 **** if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f) { ! ByteBuffer temptable=BufferUtils.createByteBuffer(768); for (i = 0; i < 256; i++) { temptable.put(i * 3 + 0, (byte) ((palette[i] >> 0) & 0xff)); --- 93,97 ---- if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f) { ! ByteBuffer temptable = Lib.newByteBuffer(768); for (i = 0; i < 256; i++) { temptable.put(i * 3 + 0, (byte) ((palette[i] >> 0) & 0xff)); *************** *** 104,108 **** } ! gl.glColorTable(EXTSharedTexturePalette.GL_SHARED_TEXTURE_PALETTE_EXT, GL11.GL_RGB, 256, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, temptable); } } --- 100,104 ---- } ! glColorTable(GL_SHARED_TEXTURE_PALETTE_EXT, GL_RGB, 256, GL_RGB, GL_UNSIGNED_BYTE, temptable); } } *************** *** 110,124 **** void GL_EnableMultitexture(boolean enable) { if (enable) { ! GL_SelectTexture(GL_TEXTURE1); ! gl.glEnable(GL11.GL_TEXTURE_2D); ! GL_TexEnv(GL11.GL_REPLACE); } else { ! GL_SelectTexture(GL_TEXTURE1); ! gl.glDisable(GL11.GL_TEXTURE_2D); ! GL_TexEnv(GL11.GL_REPLACE); } ! GL_SelectTexture(GL_TEXTURE0); ! GL_TexEnv(GL11.GL_REPLACE); } --- 106,120 ---- void GL_EnableMultitexture(boolean enable) { if (enable) { ! GL_SelectTexture(TEXTURE1); ! glEnable(GL_TEXTURE_2D); ! GL_TexEnv(GL_REPLACE); } else { ! GL_SelectTexture(TEXTURE1); ! glDisable(GL_TEXTURE_2D); ! GL_TexEnv(GL_REPLACE); } ! GL_SelectTexture(TEXTURE0); ! GL_TexEnv(GL_REPLACE); } *************** *** 126,130 **** int tmu; ! tmu = (texture == GL_TEXTURE0) ? 0 : 1; if (tmu == gl_state.currenttmu) { --- 122,126 ---- int tmu; ! tmu = (texture == TEXTURE0) ? 0 : 1; if (tmu == gl_state.currenttmu) { *************** *** 134,139 **** gl_state.currenttmu = tmu; ! gl.glActiveTextureARB(texture); ! gl.glClientActiveTextureARB(texture); } --- 130,135 ---- gl_state.currenttmu = tmu; ! glActiveTextureARB(texture); ! glClientActiveTextureARB(texture); } *************** *** 144,148 **** if (mode != lastmodes[gl_state.currenttmu]) { ! gl.glTexEnvi(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, mode); lastmodes[gl_state.currenttmu] = mode; } --- 140,144 ---- if (mode != lastmodes[gl_state.currenttmu]) { ! glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode); lastmodes[gl_state.currenttmu] = mode; } *************** *** 159,168 **** gl_state.currenttextures[gl_state.currenttmu] = texnum; ! gl.glBindTexture(GL11.GL_TEXTURE_2D, texnum); } void GL_MBind(int target /* GLenum */, int texnum) { GL_SelectTexture(target); ! if (target == GL_TEXTURE0) { if (gl_state.currenttextures[0] == texnum) return; --- 155,164 ---- gl_state.currenttextures[gl_state.currenttmu] = texnum; ! glBindTexture(GL_TEXTURE_2D, texnum); } void GL_MBind(int target /* GLenum */, int texnum) { GL_SelectTexture(target); ! if (target == TEXTURE0) { if (gl_state.currenttextures[0] == texnum) return; *************** *** 189,198 **** static final glmode_t modes[] = { ! new glmode_t("GL_NEAREST", GL11.GL_NEAREST, GL11.GL_NEAREST), ! new glmode_t("GL_LINEAR", GL11.GL_LINEAR, GL11.GL_LINEAR), ! new glmode_t("GL_NEAREST_MIPMAP_NEAREST", GL11.GL_NEAREST_MIPMAP_NEAREST, GL11.GL_NEAREST), ! new glmode_t("GL_LINEAR_MIPMAP_NEAREST", GL11.GL_LINEAR_MIPMAP_NEAREST, GL11.GL_LINEAR), ! new glmode_t("GL_NEAREST_MIPMAP_LINEAR", GL11.GL_NEAREST_MIPMAP_LINEAR, GL11.GL_NEAREST), ! new glmode_t("GL_LINEAR_MIPMAP_LINEAR", GL11.GL_LINEAR_MIPMAP_LINEAR, GL11.GL_LINEAR)}; static final int NUM_GL_MODES = modes.length; --- 185,194 ---- static final glmode_t modes[] = { ! new glmode_t("GL_NEAREST", GL_NEAREST, GL_NEAREST), ! new glmode_t("GL_LINEAR", GL_LINEAR, GL_LINEAR), ! new glmode_t("GL_NEAREST_MIPMAP_NEAREST", GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST), ! new glmode_t("GL_LINEAR_MIPMAP_NEAREST", GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR), ! new glmode_t("GL_NEAREST_MIPMAP_LINEAR", GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST), ! new glmode_t("GL_LINEAR_MIPMAP_LINEAR", GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR)}; static final int NUM_GL_MODES = modes.length; *************** *** 212,220 **** { new gltmode_t("default", 4), ! new gltmode_t("GL_RGBA", GL11.GL_RGBA), ! new gltmode_t("GL_RGBA8", GL11.GL_RGBA8), ! new gltmode_t("GL_RGB5_A1", GL11.GL_RGB5_A1), ! new gltmode_t("GL_RGBA4", GL11.GL_RGBA4), ! new gltmode_t("GL_RGBA2", GL11.GL_RGBA2), }; --- 208,216 ---- { new gltmode_t("default", 4), ! new gltmode_t("GL_RGBA", GL_RGBA), ! new gltmode_t("GL_RGBA8", GL_RGBA8), ! new gltmode_t("GL_RGB5_A1", GL_RGB5_A1), ! new gltmode_t("GL_RGBA4", GL_RGBA4), ! new gltmode_t("GL_RGBA2", GL_RGBA2), }; *************** *** 224,232 **** { new gltmode_t("default", 3), ! new gltmode_t("GL_RGB", GL11.GL_RGB), ! new gltmode_t("GL_RGB8", GL11.GL_RGB8), ! new gltmode_t("GL_RGB5", GL11.GL_RGB5), ! new gltmode_t("GL_RGB4", GL11.GL_RGB4), ! new gltmode_t("GL_R3_G3_B2", GL11.GL_R3_G3_B2), // #ifdef GL_RGB2_EXT //new gltmode_t("GL_RGB2", GL.GL_RGB2_EXT) --- 220,228 ---- { new gltmode_t("default", 3), ! new gltmode_t("GL_RGB", GL_RGB), ! new gltmode_t("GL_RGB8", GL_RGB8), ! new gltmode_t("GL_RGB5", GL_RGB5), ! new gltmode_t("GL_RGB4", GL_RGB4), ! new gltmode_t("GL_R3_G3_B2", GL_R3_G3_B2), // #ifdef GL_RGB2_EXT //new gltmode_t("GL_RGB2", GL.GL_RGB2_EXT) *************** *** 264,269 **** if (glt.type != it_pic && glt.type != it_sky) { GL_Bind(glt.texnum); ! gl.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, gl_filter_min); ! gl.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, gl_filter_max); } } --- 260,265 ---- if (glt.type != it_pic && glt.type != it_sky) { GL_Bind(glt.texnum); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } } *************** *** 1055,1059 **** int[] scaled = new int[256 * 256]; //byte[] paletted_texture = new byte[256 * 256]; ! ByteBuffer paletted_texture=BufferUtils.createByteBuffer(256*256); IntBuffer tex = Lib.newIntBuffer(512 * 256, ByteOrder.LITTLE_ENDIAN); --- 1051,1055 ---- int[] scaled = new int[256 * 256]; //byte[] paletted_texture = new byte[256 * 256]; ! ByteBuffer paletted_texture = Lib.newByteBuffer(256*256); IntBuffer tex = Lib.newIntBuffer(512 * 256, ByteOrder.LITTLE_ENDIAN); *************** *** 1128,1133 **** uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, data, scaled_width, scaled_height); ! gl.glTexImage2D( ! GL11.GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, --- 1124,1129 ---- uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, data, scaled_width, scaled_height); ! glTexImage2D( ! GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, *************** *** 1135,1146 **** scaled_height, 0, ! GL11.GL_COLOR_INDEX, ! GL11.GL_UNSIGNED_BYTE, paletted_texture); } else { tex.rewind(); tex.put(data); tex.rewind(); ! gl.glTexImage2D( ! GL11.GL_TEXTURE_2D, 0, comp, --- 1131,1142 ---- scaled_height, 0, ! GL_COLOR_INDEX, ! GL_UNSIGNED_BYTE, paletted_texture); } else { tex.rewind(); tex.put(data); tex.rewind(); ! glTexImage2D( ! GL_TEXTURE_2D, 0, comp, *************** *** 1148,1153 **** scaled_height, 0, ! GL11.GL_RGBA, ! GL11.GL_UNSIGNED_BYTE, tex); } --- 1144,1149 ---- scaled_height, 0, ! GL_RGBA, ! GL_UNSIGNED_BYTE, tex); } *************** *** 1166,1171 **** uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! gl.glTexImage2D( ! GL11.GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, --- 1162,1167 ---- uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! glTexImage2D( ! GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, *************** *** 1173,1183 **** scaled_height, 0, ! GL11.GL_COLOR_INDEX, ! GL11.GL_UNSIGNED_BYTE, paletted_texture); } else { tex.rewind(); tex.put(scaled); tex.rewind(); ! gl.glTexImage2D(GL11.GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, tex); } --- 1169,1179 ---- scaled_height, 0, ! GL_COLOR_INDEX, ! GL_UNSIGNED_BYTE, paletted_texture); } else { tex.rewind(); tex.put(scaled); tex.rewind(); ! glTexImage2D(GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex); } *************** *** 1198,1203 **** uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! gl.glTexImage2D( ! GL11.GL_TEXTURE_2D, miplevel, GL_COLOR_INDEX8_EXT, --- 1194,1199 ---- uploaded_paletted = true; GL_BuildPalettedTexture(paletted_texture, scaled, scaled_width, scaled_height); ! glTexImage2D( ! GL_TEXTURE_2D, miplevel, GL_COLOR_INDEX8_EXT, *************** *** 1205,1216 **** scaled_height, 0, ! GL11.GL_COLOR_INDEX, ! GL11.GL_UNSIGNED_BYTE, paletted_texture); } else { tex.rewind(); tex.put(scaled); tex.rewind(); ! gl.glTexImage2D( ! GL11.GL_TEXTURE_2D, miplevel, comp, --- 1201,1212 ---- scaled_height, 0, ! GL_COLOR_INDEX, ! GL_UNSIGNED_BYTE, paletted_texture); } else { tex.rewind(); tex.put(scaled); tex.rewind(); ! glTexImage2D( ! GL_TEXTURE_2D, miplevel, comp, *************** *** 1218,1223 **** scaled_height, 0, ! GL11.GL_RGBA, ! GL11.GL_UNSIGNED_BYTE, tex); } --- 1214,1219 ---- scaled_height, 0, ! GL_RGBA, ! GL_UNSIGNED_BYTE, tex); } *************** *** 1231,1240 **** if (mipmap) { ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, gl_filter_min); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, gl_filter_max); } else { ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, gl_filter_max); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, gl_filter_max); } --- 1227,1236 ---- if (mipmap) { ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } else { ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } *************** *** 1262,1269 **** if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { ! gl.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, width, height, 0, GL11.GL_COLOR_INDEX, GL11.GL_UNSIGNED_BYTE, ByteBuffer.wrap(data)); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, gl_filter_max); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, gl_filter_max); // TODO check this --- 1258,1265 ---- if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { ! glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, width, height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, ByteBuffer.wrap(data)); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); // TODO check this *************** *** 1540,1544 **** } ! IntBuffer texnumBuffer=BufferUtils.createIntBuffer(1); /* --- 1536,1540 ---- } ! IntBuffer texnumBuffer=Lib.newIntBuffer(1); /* *************** *** 1574,1578 **** texnumBuffer.clear(); texnumBuffer.put(0,image.texnum); ! gl.glDeleteTextures(texnumBuffer); image.clear(); } --- 1570,1574 ---- texnumBuffer.clear(); texnumBuffer.put(0,image.texnum); ! glDeleteTextures(texnumBuffer); image.clear(); } *************** *** 1586,1596 **** protected void Draw_GetPalette() { int r, g, b; - Dimension dim; - byte[] pic; byte[][] palette = new byte[1][]; //new byte[768]; // get the palette ! pic = LoadPCX("pics/colormap.pcx", palette, dim = new Dimension()); if (palette[0] == null || palette[0].length != 768) --- 1582,1590 ---- protected void Draw_GetPalette() { int r, g, b; byte[][] palette = new byte[1][]; //new byte[768]; // get the palette ! LoadPCX("pics/colormap.pcx", palette, null); if (palette[0] == null || palette[0].length != 768) *************** *** 1686,1690 **** texnumBuffer.clear(); texnumBuffer.put(0,image.texnum); ! gl.glDeleteTextures(texnumBuffer); image.clear(); } --- 1680,1684 ---- texnumBuffer.clear(); texnumBuffer.put(0,image.texnum); ! glDeleteTextures(texnumBuffer); image.clear(); } Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Surf.java,v retrieving revision 1.9 retrieving revision 1.9.4.1 diff -C2 -d -r1.9 -r1.9.4.1 *** Surf.java 8 Jun 2005 21:27:10 -0000 1.9 --- Surf.java 10 Jul 2005 17:55:50 -0000 1.9.4.1 *************** *** 37,43 **** import java.util.Arrays; - import org.lwjgl.BufferUtils; - import org.lwjgl.opengl.GL11; - /** * Surf --- 37,40 ---- *************** *** 65,69 **** int c_visible_textures; ! static final int GL_LIGHTMAP_FORMAT = GL11.GL_RGBA; static class gllightmapstate_t --- 62,66 ---- int c_visible_textures; ! static final int GL_LIGHTMAP_FORMAT = GL_RGBA; static class gllightmapstate_t *************** *** 139,143 **** void DrawGLPoly(glpoly_t p) { ! gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } --- 136,140 ---- void DrawGLPoly(glpoly_t p) { ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); } *************** *** 152,156 **** scroll = -64.0f; p.beginScrolling(scroll); ! gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } --- 149,153 ---- scroll = -64.0f; p.beginScrolling(scroll); ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } *************** *** 164,170 **** return; ! gl.glDisable(GL11.GL_TEXTURE_2D); ! gl.glDisable(GL11.GL_DEPTH_TEST); ! gl.glColor4f(1, 1, 1, 1); msurface_t surf; --- 161,167 ---- return; ! glDisable(GL_TEXTURE_2D); ! glDisable(GL_DEPTH_TEST); ! glColor4f(1, 1, 1, 1); msurface_t surf; *************** *** 175,184 **** for (p = surf.polys; p != null; p = p.chain) { for (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(); } } --- 172,181 ---- for (p = surf.polys; p != null; p = p.chain) { for (j = 2; j < p.numverts; j++) { ! glBegin(GL_LINE_STRIP); ! glVertex3f(p.x(0), p.y(0), p.z(0)); ! glVertex3f(p.x(j-1), p.y(j-1), p.z(j-1)); ! glVertex3f(p.x(j), p.y(j), p.z(j)); ! glVertex3f(p.x(0), p.y(0), p.z(0)); ! glEnd(); } } *************** *** 186,191 **** } ! gl.glEnable(GL11.GL_DEPTH_TEST); ! gl.glEnable(GL11.GL_TEXTURE_2D); } --- 183,188 ---- } ! glEnable(GL_DEPTH_TEST); ! glEnable(GL_TEXTURE_2D); } *************** *** 206,216 **** // warp texture, no lightmaps ! GL_TexEnv( GL11.GL_MODULATE ); ! gl.glColor4f( gl_state.inverse_intensity, gl_state.inverse_intensity, gl_state.inverse_intensity, 1.0F ); EmitWaterPolys (fa); ! GL_TexEnv( GL11.GL_REPLACE ); return; --- 203,213 ---- // warp texture, no lightmaps ! GL_TexEnv( GL_MODULATE ); ! glColor4f( gl_state.inverse_intensity, gl_state.inverse_intensity, gl_state.inverse_intensity, 1.0F ); EmitWaterPolys (fa); ! GL_TexEnv( GL_REPLACE ); return; *************** *** 219,223 **** { GL_Bind( image.texnum ); ! GL_TexEnv( GL11.GL_REPLACE ); } --- 216,220 ---- { GL_Bind( image.texnum ); ! GL_TexEnv( GL_REPLACE ); } *************** *** 277,285 **** GL_Bind( gl_state.lightmap_textures + fa.lightmaptexturenum ); ! gl.glTexSubImage2D( GL11.GL_TEXTURE_2D, 0, fa.light_s, fa.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL11.GL_UNSIGNED_BYTE, temp2 ); fa.lightmapchain = gl_lms.lightmap_surfaces[fa.lightmaptexturenum]; --- 274,282 ---- GL_Bind( gl_state.lightmap_textures + fa.lightmaptexturenum ); ! glTexSubImage2D( GL_TEXTURE_2D, 0, fa.light_s, fa.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, temp2 ); fa.lightmapchain = gl_lms.lightmap_surfaces[fa.lightmaptexturenum]; *************** *** 312,319 **** // go back to the world matrix // ! gl.glLoadMatrix(r_world_matrix); ! gl.glEnable (GL11.GL_BLEND); ! GL_TexEnv(GL11.GL_MODULATE ); --- 309,316 ---- // go back to the world matrix // ! glLoadMatrix(r_world_matrix); ! glEnable (GL_BLEND); ! GL_TexEnv(GL_MODULATE ); *************** *** 322,326 **** float intens = gl_state.inverse_intensity; ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); for (msurface_t s = r_alpha_surfaces ; s != null ; s=s.texturechain) --- 319,323 ---- float intens = gl_state.inverse_intensity; ! glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); for (msurface_t s = r_alpha_surfaces ; s != null ; s=s.texturechain) *************** *** 329,337 **** c_brush_polys++; if ((s.texinfo.flags & Defines.SURF_TRANS33) != 0) ! gl.glColor4f (intens, intens, intens, 0.33f); else if ((s.texinfo.flags & Defines.SURF_TRANS66) != 0) ! gl.glColor4f (intens, intens, intens, 0.66f); else ! gl.glColor4f (intens,intens,intens,1); if ((s.flags & Defines.SURF_DRAWTURB) != 0) EmitWaterPolys(s); --- 326,334 ---- c_brush_polys++; if ((s.texinfo.flags & Defines.SURF_TRANS33) != 0) ! glColor4f (intens, intens, intens, 0.33f); else if ((s.texinfo.flags & Defines.SURF_TRANS66) != 0) ! glColor4f (intens, intens, intens, 0.66f); else ! glColor4f (intens,intens,intens,1); if ((s.flags & Defines.SURF_DRAWTURB) != 0) EmitWaterPolys(s); *************** *** 342,348 **** } ! GL_TexEnv( GL11.GL_REPLACE ); ! gl.glColor4f (1,1,1,1); ! gl.glDisable (GL11.GL_BLEND); r_alpha_surfaces = null; --- 339,345 ---- } ! GL_TexEnv( GL_REPLACE ); ! glColor4f (1,1,1,1); ! glDisable (GL_BLEND); r_alpha_surfaces = null; *************** *** 396,400 **** } ! GL_TexEnv( GL11.GL_REPLACE ); } --- 393,397 ---- } ! GL_TexEnv( GL_REPLACE ); } *************** *** 455,467 **** R_SetCacheState( surf ); ! GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + surf.lightmaptexturenum ); lmtex = surf.lightmaptexturenum; ! gl.glTexSubImage2D( GL11.GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL11.GL_UNSIGNED_BYTE, temp ); } --- 452,464 ---- R_SetCacheState( surf ); ! GL_MBind(TEXTURE1, gl_state.lightmap_textures + surf.lightmaptexturenum ); lmtex = surf.lightmaptexturenum; ! glTexSubImage2D( GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, temp ); } *************** *** 473,485 **** R_BuildLightMap( surf, temp, smax); ! GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + 0 ); lmtex = 0; ! gl.glTexSubImage2D( GL11.GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL11.GL_UNSIGNED_BYTE, temp ); } --- 470,482 ---- R_BuildLightMap( surf, temp, smax); ! GL_MBind(TEXTURE1, gl_state.lightmap_textures + 0 ); lmtex = 0; ! glTexSubImage2D( GL_TEXTURE_2D, 0, surf.light_s, surf.light_t, smax, tmax, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, temp ); } *************** *** 487,492 **** c_brush_polys++; ! GL_MBind( GL_TEXTURE0, image.texnum ); ! GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + lmtex ); // ========== --- 484,489 ---- c_brush_polys++; ! GL_MBind(TEXTURE0, image.texnum ); ! GL_MBind(TEXTURE1, gl_state.lightmap_textures + lmtex ); // ========== *************** *** 503,507 **** { p.beginScrolling(scroll); ! gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } --- 500,504 ---- { p.beginScrolling(scroll); ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } *************** *** 511,515 **** for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } } --- 508,512 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); } } *************** *** 521,526 **** c_brush_polys++; ! GL_MBind( GL_TEXTURE0, image.texnum ); ! GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + lmtex); // ========== --- 518,523 ---- c_brush_polys++; ! GL_MBind(TEXTURE0, image.texnum ); ! GL_MBind(TEXTURE1, gl_state.lightmap_textures + lmtex); // ========== *************** *** 537,541 **** { p.beginScrolling(scroll); ! gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } --- 534,538 ---- { p.beginScrolling(scroll); ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); p.endScrolling(); } *************** *** 547,551 **** for ( p = surf.polys; p != null; p = p.chain ) { ! gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } --- 544,548 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! glDrawArrays(GL_POLYGON, p.pos, p.numverts); } *************** *** 581,587 **** if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! gl.glEnable (GL11.GL_BLEND); ! gl.glColor4f (1,1,1,0.25f); ! GL_TexEnv( GL11.GL_MODULATE ); } --- 578,584 ---- if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! glEnable (GL_BLEND); ! glColor4f (1,1,1,0.25f); ! GL_TexEnv( GL_MODULATE ); } *************** *** 623,629 **** if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! gl.glDisable (GL11.GL_BLEND); ! gl.glColor4f (1,1,1,1); ! GL_TexEnv( GL11.GL_REPLACE ); } } --- 620,626 ---- if ( (currententity.flags & Defines.RF_TRANSLUCENT) != 0 ) { ! glDisable (GL_BLEND); ! glColor4f (1,1,1,1); ! GL_TexEnv( GL_REPLACE ); } } *************** *** 666,670 **** if (R_CullBox(mins, maxs)) return; ! gl.glColor3f (1,1,1); // memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces)); --- 663,667 ---- if (R_CullBox(mins, maxs)) return; ! glColor3f (1,1,1); // memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces)); *************** *** 683,687 **** } ! gl.glPushMatrix(); e.angles[0] = -e.angles[0]; // stupid quake bug --- 680,684 ---- } ! glPushMatrix(); e.angles[0] = -e.angles[0]; // stupid quake bug *************** *** 692,711 **** GL_EnableMultitexture( true ); ! 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); R_DrawInlineBModel(); ! gl.glClientActiveTextureARB(GL_TEXTURE1); ! gl.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY); GL_EnableMultitexture( false ); ! gl.glPopMatrix(); } --- 689,708 ---- GL_EnableMultitexture( true ); ! GL_SelectTexture(TEXTURE0); ! GL_TexEnv( GL_REPLACE ); ! glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); ! GL_SelectTexture(TEXTURE1); ! GL_TexEnv( GL_MODULATE ); ! glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); ! glEnableClientState(GL_TEXTURE_COORD_ARRAY); R_DrawInlineBModel(); ! glClientActiveTextureARB(TEXTURE1); ! glDisableClientState(GL_TEXTURE_COORD_ARRAY); GL_EnableMultitexture( false ); ! glPopMatrix(); } *************** *** 867,871 **** gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1; ! gl.glColor3f (1,1,1); // memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces)); // TODO wird bei multitexture nicht gebraucht --- 864,868 ---- gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1; ! glColor3f (1,1,1); // memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces)); // TODO wird bei multitexture nicht gebraucht *************** *** 876,895 **** GL_EnableMultitexture( true ); ! 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); if ( gl_lightmap.value != 0) ! GL_TexEnv( GL11.GL_REPLACE ); else ! GL_TexEnv( GL11.GL_MODULATE ); R_RecursiveWorldNode(r_worldmodel.nodes[0]); // root node ! gl.glClientActiveTextureARB(GL_TEXTURE1); ! gl.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY); GL_EnableMultitexture( false ); --- 873,892 ---- GL_EnableMultitexture( true ); ! GL_SelectTexture(TEXTURE0); ! GL_TexEnv( GL_REPLACE ); ! glInterleavedArrays(GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); ! GL_SelectTexture(TEXTURE1); ! glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); ! glEnableClientState(GL_TEXTURE_COORD_ARRAY); if ( gl_lightmap.value != 0) ! GL_TexEnv( GL_REPLACE ); else ! GL_TexEnv( GL_MODULATE ); R_RecursiveWorldNode(r_worldmodel.nodes[0]); // root node ! glClientActiveTextureARB(TEXTURE1); ! glDisableClientState(GL_TEXTURE_COORD_ARRAY); GL_EnableMultitexture( false ); *************** *** 1000,1005 **** GL_Bind( gl_state.lightmap_textures + texture ); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); gl_lms.lightmap_buffer.rewind(); --- 997,1002 ---- GL_Bind( gl_state.lightmap_textures + texture ); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); gl_lms.lightmap_buffer.rewind(); *************** *** 1013,1027 **** } ! gl.glTexSubImage2D( GL11.GL_TEXTURE_2D, 0, 0, 0, BLOCK_WIDTH, height, GL_LIGHTMAP_FORMAT, ! GL11.GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer ); } else { ! gl.glTexImage2D( GL11.GL_TEXTURE_2D, 0, gl_lms.internal_format, --- 1010,1024 ---- } ! glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, BLOCK_WIDTH, height, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer ); } else { ! glTexImage2D( GL_TEXTURE_2D, 0, gl_lms.internal_format, *************** *** 1029,1033 **** 0, GL_LIGHTMAP_FORMAT, ! GL11.GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) --- 1026,1030 ---- 0, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) *************** *** 1188,1192 **** lightstyle_t[] lightstyles; ! private final IntBuffer dummy = BufferUtils.createIntBuffer(128*128); /** --- 1185,1189 ---- lightstyle_t[] lightstyles; ! private final IntBuffer dummy = Lib.newIntBuffer(128*128); /** *************** *** 1213,1217 **** GL_EnableMultitexture( true ); ! GL_SelectTexture( GL_TEXTURE1); /* --- 1210,1214 ---- GL_EnableMultitexture( true ); ! GL_SelectTexture(TEXTURE1); /* *************** *** 1264,1272 **** else if ( format == 'I' ) { ! gl_lms.internal_format = GL11.GL_INTENSITY8; } else if ( format == 'L' ) { ! gl_lms.internal_format = GL11.GL_LUMINANCE8; } else --- 1261,1269 ---- else if ( format == 'I' ) { ! gl_lms.internal_format = GL_INTENSITY8; } else if ( format == 'L' ) { ! gl_lms.internal_format = GL_LUMINANCE8; } else *************** *** 1279,1285 **** */ GL_Bind( gl_state.lightmap_textures + 0 ); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); ! gl.glTexImage2D( GL11.GL_TEXTURE_2D, 0, gl_lms.internal_format, --- 1276,1282 ---- */ GL_Bind( gl_state.lightmap_textures + 0 ); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ! glTexImage2D( GL_TEXTURE_2D, 0, gl_lms.internal_format, *************** *** 1287,1291 **** 0, GL_LIGHTMAP_FORMAT, ! GL11.GL_UNSIGNED_BYTE, dummy ); } --- 1284,1288 ---- 0, GL_LIGHTMAP_FORMAT, ! GL_UNSIGNED_BYTE, dummy ); } Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Light.java,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** Light.java 7 May 2005 17:21:42 -0000 1.4 --- Light.java 10 Jul 2005 17:55:50 -0000 1.4.6.1 *************** *** 39,44 **** import java.util.Arrays; - import org.lwjgl.opengl.GL11; - /** * Light --- 39,42 ---- *************** *** 72,83 **** Math3D.VectorSubtract (light.origin, r_origin, v); ! gl.glBegin (GL11.GL_TRIANGLE_FAN); ! gl.glColor3f (light.color[0]*0.2f, light.color[1]*0.2f, light.color[2]*0.2f); int i; for (i=0 ; i<3 ; i++) v[i] = light.origin[i] - vpn[i]*rad; ! gl.glVertex3f(v[0], v[1], v[2]); ! gl.glColor3f (0,0,0); int j; --- 70,81 ---- Math3D.VectorSubtract (light.origin, r_origin, v); ! glBegin (GL_TRIANGLE_FAN); ! glColor3f (light.color[0]*0.2f, light.color[1]*0.2f, light.color[2]*0.2f); int i; for (i=0 ; i<3 ; i++) v[i] = light.origin[i] - vpn[i]*rad; ! glVertex3f(v[0], v[1], v[2]); ! glColor3f (0,0,0); int j; *************** *** 89,95 **** v[j] = (float)(light.origin[j] + vright[j]*Math.cos(a)*rad + vup[j]*Math.sin(a)*rad); ! gl.glVertex3f(v[0], v[1], v[2]); } ! gl.glEnd (); } --- 87,93 ---- v[j] = (float)(light.origin[j] + vright[j]*Math.cos(a)*rad + vup[j]*Math.sin(a)*rad); ! glVertex3f(v[0], v[1], v[2]); } ! glEnd (); } *************** *** 104,112 **** r_dlightframecount = r_framecount + 1; // because the count hasn't // advanced yet for this frame ! gl.glDepthMask(false); ! gl.glDisable(GL11.GL_TEXTURE_2D); ! gl.glShadeModel (GL11.GL_SMOOTH); ! gl.glEnable (GL11.GL_BLEND); ! gl.glBlendFunc (GL11.GL_ONE, GL11.GL_ONE); for (int i=0 ; i<r_newrefdef.num_dlights ; i++) --- 102,110 ---- r_dlightframecount = r_framecount + 1; // because the count hasn't // advanced yet for this frame ! glDepthMask(false); ! glDisable(GL_TEXTURE_2D); ! glShadeModel (GL_SMOOTH); ! glEnable (GL_BLEND); ! glBlendFunc (GL_ONE, GL_ONE); for (int i=0 ; i<r_newrefdef.num_dlights ; i++) *************** *** 115,123 **** } ! gl.glColor3f (1,1,1); ! gl.glDisable(GL11.GL_BLEND); ! gl.glEnable(GL11.GL_TEXTURE_2D); ! gl.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); ! gl.glDepthMask(true); } --- 113,121 ---- } ! glColor3f (1,1,1); ! glDisable(GL_BLEND); ! glEnable(GL_TEXTURE_2D); ! glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ! glDepthMask(true); } Index: Base.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Base.java,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** Base.java 8 Jun 2005 21:24:52 -0000 1.4 --- Base.java 10 Jul 2005 17:55:51 -0000 1.4.4.1 *************** *** 26,30 **** package jake2.render.lwjgl; ! import org.lwjgl.opengl.GL11; /** --- 26,34 ---- package jake2.render.lwjgl; ! import jake2.client.viddef_t; ! import jake2.game.cvar_t; ! import jake2.render.QGL; ! ! import java.awt.Dimension; /** *************** *** 33,51 **** * @author dsanders/cwei */ ! public abstract class Base extends LWJGLBase { ! ! static final int GL_COLOR_INDEX8_EXT = GL11.GL_COLOR_INDEX; ! static final String REF_VERSION = "GL 0.01"; ! // up / down static final int PITCH = 0; ! // left / right static final int YAW = 1; ! // fall over static final int ROLL = 2; ! /* * skins will be outline flood filled and mip mapped pics and sprites with --- 37,55 ---- * @author dsanders/cwei */ ! public abstract class Base extends QGL { ! ! static final int GL_COLOR_INDEX8_EXT = GL_COLOR_INDEX; ! static final String REF_VERSION = "GL 0.01"; ! // up / down static final int PITCH = 0; ! // left / right static final int YAW = 1; ! // fall over static final int ROLL = 2; ! /* * skins will be outline flood filled and mip mapped pics and sprites with *************** *** 56,154 **** // enum imagetype_t static final int it_skin = 0; ! static final int it_sprite = 1; ! static final int it_wall = 2; ! static final int it_pic = 3; ! static final int it_sky = 4; ! // enum modtype_t static final int mod_bad = 0; ! static final int mod_brush = 1; ! static final int mod_sprite = 2; ! static final int mod_alias = 3; ! static final int TEXNUM_LIGHTMAPS = 1024; ! static final int TEXNUM_SCRAPS = 1152; ! static final int TEXNUM_IMAGES = 1153; ! static final int MAX_GLTEXTURES = 1024; ! static final int MAX_LBM_HEIGHT = 480; ! static final float BACKFACE_EPSILON = 0.01f; ! /* * * GL config stuff */ static final int GL_RENDERER_VOODOO = 0x00000001; ! static final int GL_RENDERER_VOODOO2 = 0x00000002; ! static final int GL_RENDERER_VOODOO_RUSH = 0x00000004; ! static final int GL_RENDERER_BANSHEE = 0x00000008; ! static final int GL_RENDERER_3DFX = 0x0000000F; ! static final int GL_RENDERER_PCX1 = 0x00000010; ! static final int GL_RENDERER_PCX2 = 0x00000020; ! static final int GL_RENDERER_PMX = 0x00000040; ! static final int GL_RENDERER_POWERVR = 0x00000070; ! static final int GL_RENDERER_PERMEDIA2 = 0x00000100; ! static final int GL_RENDERER_GLINT_MX = 0x00000200; ! static final int GL_RENDERER_GLINT_TX = 0x00000400; ! static final int GL_RENDERER_3DLABS_MISC = 0x00000800; ! static final int GL_RENDERER_3DLABS = 0x00000F00; ! static final int GL_RENDERER_REALIZM = 0x00001000; ! static final int GL_RENDERER_REALIZM2 = 0x00002000; ! static final int GL_RENDERER_INTERGRAPH = 0x00003000; ! static final int GL_RENDERER_3DPRO = 0x00004000; ! static final int GL_RENDERER_REAL3D = 0x00008000; ! static final int GL_RENDERER_RIVA128 = 0x00010000; ! static final int GL_RENDERER_DYPIC = 0x00020000; ! static final int GL_RENDERER_V1000 = 0x00040000; ! static final int GL_RENDERER_V2100 = 0x00080000; ! static final int GL_RENDERER_V2200 = 0x00100000; ! static final int GL_RENDERER_RENDITION = 0x001C0000; ! static final int GL_RENDERER_O2 = 0x00100000; ! static final int GL_RENDERER_IMPACT = 0x00200000; ! static final int GL_RENDERER_RE = 0x00400000; ! static final int GL_RENDERER_IR = 0x00800000; ! static final int GL_RENDERER_SGI = 0x00F00000; ! static final int GL_RENDERER_MCD = 0x01000000; ! static final int GL_RENDERER_OTHER = 0x80000000; } \ No newline at end of file --- 60,197 ---- // enum imagetype_t static final int it_skin = 0; ! static final int it_sprite = 1; ! static final int it_wall = 2; ! static final int it_pic = 3; ! static final int it_sky = 4; ! // enum modtype_t static final int mod_bad = 0; ! static final int mod_brush = 1; ! static final int mod_sprite = 2; ! static final int mod_alias = 3; ! static final int TEXNUM_LIGHTMAPS = 1024; ! static final int TEXNUM_SCRAPS = 1152; ! static final int TEXNUM_IMAGES = 1153; ! static final int MAX_GLTEXTURES = 1024; ! static final int MAX_LBM_HEIGHT = 480; ! static final float BACKFACE_EPSILON = 0.01f; ! /* * * GL config stuff */ static final int GL_RENDERER_VOODOO = 0x00000001; ! static final int GL_RENDERER_VOODOO2 = 0x00000002; ! static final int GL_RENDERER_VOODOO_RUSH = 0x00000004; ! static final int GL_RENDERER_BANSHEE = 0x00000008; ! static final int GL_RENDERER_3DFX = 0x0000000F; ! static final int GL_RENDERER_PCX1 = 0x00000010; ! static final int GL_RENDERER_PCX2 = 0x00000020; ! static final int GL_RENDERER_PMX = 0x00000040; ! static final int GL_RENDERER_POWERVR = 0x00000070; ! static final int GL_RENDERER_PERMEDIA2 = 0x00000100; ! static final int GL_RENDERER_GLINT_MX = 0x00000200; ! static final int GL_RENDERER_GLINT_TX = 0x00000400; ! static final int GL_RENDERER_3DLABS_MISC = 0x00000800; ! static final int GL_RENDERER_3DLABS = 0x00000F00; ! static final int GL_RENDERER_REALIZM = 0x00001000; ! static final int GL_RENDERER_REALIZM2 = 0x00002000; ! static final int GL_RENDERER_INTERGRAPH = 0x00003000; ! static final int GL_RENDERER_3DPRO = 0x00004000; ! static final int GL_RENDERER_REAL3D = 0x00008000; ! static final int GL_RENDERER_RIVA128 = 0x00010000; ! static final int GL_RENDERER_DYPIC = 0x00020000; ! static final int GL_RENDERER_V1000 = 0x00040000; ! static final int GL_RENDERER_V2100 = 0x00080000; ! static final int GL_RENDERER_V2200 = 0x00100000; ! static final int GL_RENDERER_RENDITION = 0x001C0000; ! static final int GL_RENDERER_O2 = 0x00100000; ! static final int GL_RENDERER_IMPACT = 0x00200000; ! static final int GL_RENDERER_RE = 0x00400000; ! static final int GL_RENDERER_IR = 0x00800000; ! static final int GL_RENDERER_SGI = 0x00F00000; ! static final int GL_RENDERER_MCD = 0x01000000; ! static final int GL_RENDERER_OTHER = 0x80000000; + + /* + * base members + */ + + protected viddef_t vid = new viddef_t(); + + protected cvar_t vid_fullscreen; + + // enum rserr_t + protected static final int rserr_ok = 0; + + protected static final int rserr_invalid_fullscreen = 1; + + protected static final int rserr_invalid_mode = 2; + + protected static final int rserr_unknown = 3; + + protected abstract int GLimp_SetMode(Dimension dim, int mode, + boolean fullscreen); + + protected abstract void GLimp_Shutdown(); + + protected void GLimp_BeginFrame(float camera_separation) { + // do nothing + } + + protected void GLimp_AppActivate(boolean activate) { + // do nothing + } + + protected void GLimp_EnableLogging(boolean enable) { + // do nothing + } + + protected void GLimp_LogNewFrame() { + // do nothing + } + } \ No newline at end of file Index: Draw.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Draw.java,v retrieving revision 1.2 retrieving revision 1.2.8.1 diff -C2 -d -r1.2 -r1.2.8.1 *** Draw.java 14 Dec 2004 12:56:59 -0000 1.2 --- Draw.java 10 Jul 2005 17:55:50 -0000 1.2.8.1 *************** *** 30,33 **** --- 30,34 ---- import jake2.qcommon.Com; import jake2.render.image_t; + import jake2.util.Lib; import java.awt.Dimension; *************** *** 35,41 **** import java.nio.IntBuffer; - import org.lwjgl.BufferUtils; - import org.lwjgl.opengl.GL11; - /** * Draw --- 36,39 ---- *************** *** 55,60 **** draw_chars = GL_FindImage("pics/conchars.pcx", it_pic); GL_Bind(draw_chars.texnum); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST); } --- 53,58 ---- draw_chars = GL_FindImage("pics/conchars.pcx", it_pic); GL_Bind(draw_chars.texnum); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); } *************** *** 85,98 **** GL_Bind(draw_chars.texnum); ! gl.glBegin (GL11.GL_QUADS); ! gl.glTexCoord2f (fcol, frow); ! gl.glVertex2f (x, y); ! gl.glTexCoord2f (fcol + size, frow); ! gl.glVertex2f (x+8, y); ! gl.glTexCoord2f (fcol + size, frow + size); ! gl.glVertex2f (x+8, y+8); ! gl.glTexCoord2f (fcol, frow + size); ! gl.glVertex2f (x, y+8); ! gl.glEnd (); } --- 83,96 ---- GL_Bind(draw_chars.texnum); ! glBegin (GL_QUADS); ! glTexCoord2f (fcol, frow); ! glVertex2f (x, y); ! glTexCoord2f (fcol + size, frow); ! glVertex2f (x+8, y); ! glTexCoord2f (fcol + size, frow + size); ! glVertex2f (x+8, y+8); ! glTexCoord2f (fcol, frow + size); ! glVertex2f (x, y+8); ! glEnd (); } *************** *** 150,169 **** if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0) ) && !image.has_alpha) ! gl.glDisable(GL11.GL_ALPHA_TEST); GL_Bind(image.texnum); ! gl.glBegin (GL11.GL_QUADS); ! gl.glTexCoord2f (image.sl, image.tl); ! gl.glVertex2f (x, y); ! gl.glTexCoord2f (image.sh, image.tl); ! gl.glVertex2f (x+w, y); ! gl.glTexCoord2f (image.sh, image.th); ! gl.glVertex2f (x+w, y+h); ! gl.glTexCoord2f (image.sl, image.th); ! gl.glVertex2f (x, y+h); ! gl.glEnd (); if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) !=0 ) ) && !image.has_alpha) ! gl.glEnable(GL11.GL_ALPHA_TEST); } --- 148,167 ---- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0) ) && !image.has_alpha) ! glDisable(GL_ALPHA_TEST); GL_Bind(image.texnum); ! glBegin (GL_QUADS); ! glTexCoord2f (image.sl, image.tl); ! glVertex2f (x, y); ! glTexCoord2f (image.sh, image.tl); ! glVertex2f (x+w, y); ! glTexCoord2f (image.sh, image.th); ! glVertex2f (x+w, y+h); ! glTexCoord2f (image.sl, image.th); ! glVertex2f (x, y+h); ! glEnd (); if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) !=0 ) ) && !image.has_alpha) ! glEnable(GL_ALPHA_TEST); } *************** *** 188,208 **** if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) ! gl.glDisable (GL11.GL_ALPHA_TEST); GL_Bind(image.texnum); ! gl.glBegin (GL11.GL_QUADS); ! gl.glTexCoord2f (image.sl, image.tl); ! gl.glVertex2f (x, y); ! gl.glTexCoord2f (image.sh, image.tl); ! gl.glVertex2f (x+image.width, y); ! gl.glTexCoord2f (image.sh, image.th); ! gl.glVertex2f (x+image.width, y+image.height); ! gl.glTexCoord2f (image.sl, image.th); ! gl.glVertex2f (x, y+image.height); ! gl.glEnd (); if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) ! gl.glEnable (GL11.GL_ALPHA_TEST); } --- 186,206 ---- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) ! glDisable (GL_ALPHA_TEST); GL_Bind(image.texnum); ! glBegin (GL_QUADS); ! glTexCoord2f (image.sl, image.tl); ! glVertex2f (x, y); ! glTexCoord2f (image.sh, image.tl); ! glVertex2f (x+image.width, y); ! glTexCoord2f (image.sh, image.th); ! glVertex2f (x+image.width, y+image.height); ! glTexCoord2f (image.sl, image.th); ! glVertex2f (x, y+image.height); ! glEnd (); if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) ! glEnable (GL_ALPHA_TEST); } *************** *** 226,245 **** if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) ! gl.glDisable(GL11.GL_ALPHA_TEST); GL_Bind(image.texnum); ! gl.glBegin (GL11.GL_QUADS); ! gl.glTexCoord2f(x/64.0f, y/64.0f); ! gl.glVertex2f (x, y); ! gl.glTexCoord2f( (x+w)/64.0f, y/64.0f); ! gl.glVertex2f(x+w, y); ! gl.glTexCoord2f( (x+w)/64.0f, (y+h)/64.0f); ! gl.glVertex2f(x+w, y+h); ! gl.glTexCoord2f( x/64.0f, (y+h)/64.0f ); ! gl.glVertex2f (x, y+h); ! gl.glEnd (); if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) ! gl.glEnable(GL11.GL_ALPHA_TEST); } --- 224,243 ---- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) ! glDisable(GL_ALPHA_TEST); GL_Bind(image.texnum); ! glBegin (GL_QUADS); ! glTexCoord2f(x/64.0f, y/64.0f); ! glVertex2f (x, y); ! glTexCoord2f( (x+w)/64.0f, y/64.0f); ! glVertex2f(x+w, y); ! glTexCoord2f( (x+w)/64.0f, (y+h)/64.0f); ! glVertex2f(x+w, y+h); ! glTexCoord2f( x/64.0f, (y+h)/64.0f ); ! glVertex2f (x, y+h); ! glEnd (); if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) ! glEnable(GL_ALPHA_TEST); } *************** *** 257,265 **** Com.Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); ! gl.glDisable(GL11.GL_TEXTURE_2D); int color = d_8to24table[colorIndex]; ! gl.glColor3ub( (byte)((color >> 0) & 0xff), // r (byte)((color >> 8) & 0xff), // g --- 255,263 ---- Com.Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); ! glDisable(GL_TEXTURE_2D); int color = d_8to24table[colorIndex]; ! glColor3ub( (byte)((color >> 0) & 0xff), // r (byte)((color >> 8) & 0xff), // g *************** *** 267,280 **** ); ! gl.glBegin (GL11.GL_QUADS); ! gl.glVertex2f(x,y); ! gl.glVertex2f(x+w, y); ! gl.glVertex2f(x+w, y+h); ! gl.glVertex2f(x, y+h); ! gl.glEnd(); ! gl.glColor3f(1,1,1); ! gl.glEnable(GL11.GL_TEXTURE_2D); } --- 265,278 ---- ); ! glBegin (GL_QUADS); ! glVertex2f(x,y); ! glVertex2f(x+w, y); ! glVertex2f(x+w, y+h); ! glVertex2f(x, y+h); ! glEnd(); ! glColor3f(1,1,1); ! glEnable(GL_TEXTURE_2D); } *************** *** 287,310 **** */ protected void Draw_FadeScreen() { ! gl.glEnable(GL11.GL_BLEND); ! gl.glDisable(GL11.GL_TEXTURE_2D); ! gl.glColor4f(0, 0, 0, 0.8f); ! gl.glBegin(GL11.GL_QUADS); ! gl.glVertex2f(0,0); ! gl.glVertex2f(vid.width, 0); ! gl.glVertex2f(vid.width, vid.height); ! gl.glVertex2f(0, vid.height); ! gl.glEnd(); ! gl.glColor4f(1,1,1,1); ! gl.glEnable(GL11.GL_TEXTURE_2D); ! gl.glDisable(GL11.GL_BLEND); } // ==================================================================== ! IntBuffer image32=BufferUtils.createIntBuffer(256*256); ! ByteBuffer image8=BufferUtils.createByteBuffer(256*256); --- 285,308 ---- */ protected void Draw_FadeScreen() { ! glEnable(GL_BLEND); ! glDisable(GL_TEXTURE_2D); ! glColor4f(0, 0, 0, 0.8f); ! glBegin(GL_QUADS); ! glVertex2f(0,0); ! glVertex2f(vid.width, 0); ! glVertex2f(vid.width, vid.height); ! glVertex2f(0, vid.height); ! glEnd(); ! glColor4f(1,1,1,1); ! glEnable(GL_TEXTURE_2D); ! glDisable(GL_BLEND); } // ==================================================================== ! IntBuffer image32=Lib.newIntBuffer(256*256); ! ByteBuffer image8=Lib.newByteBuffer(256*256); *************** *** 358,362 **** } } ! gl.glTexImage2D (GL11.GL_TEXTURE_2D, 0, gl_tex_solid_format, 256, 256, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, image32); } else --- 356,360 ---- } } ! glTexImage2D (GL_TEXTURE_2D, 0, gl_tex_solid_format, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, image32); } else *************** *** 382,413 **** } ! gl.glTexImage2D( GL11.GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, 256, 256, 0, ! GL11.GL_COLOR_INDEX, ! GL11.GL_UNSIGNED_BYTE, image8 ); } ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); ! gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); if ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) ! gl.glDisable (GL11.GL_ALPHA_TEST); ! gl.glBegin (GL11.GL_QUADS); ! gl.glTexCoord2f (0, 0); ! gl.glVertex2f (x, y); ! gl.glTexCoord2f (1, 0); ! gl.glVertex2f (x+w, y); ! gl.glTexCoord2f (1, t); ! gl.glVertex2f (x+w, y+h); ! gl.glTexCoord2f (0, t); ! gl.glVertex2f (x, y+h); ! gl.glEnd (); if ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) ! gl.glEnable (GL11.GL_ALPHA_TEST); } --- 380,411 ---- } ! glTexImage2D( GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, 256, 256, 0, ! GL_COLOR_INDEX, ! GL_UNSIGNED_BYTE, image8 ); } ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ! glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); if ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) ! glDisable (GL_ALPHA_TEST); ! glBegin (GL_QUADS); ! glTexCoord2f (0, 0); ! glVertex2f (x, y); ! glTexCoord2f (1, 0); ! glVertex2f (x+w, y); ! glTexCoord2f (1, t); ! glVertex2f (x+w, y+h); ! glTexCoord2f (0, t); ! glVertex2f (x, y+h); ! glEnd (); if ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) ! glEnable (GL_ALPHA_TEST); } Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Model.java,v retrieving revision 1.10 retrieving revision 1.10.6.1 diff -C2 -d -r1.10 -r1.10.6.1 *** Model.java 15 May 2005 15:59:57 -0000 1.10 --- Model.java 10 Jul 2005 17:55:50 -0000 1.10.6.1 *************** *** 32,37 **** import jake2.qcommon.*; import jake2.render.*; ! import jake2.util.Math3D; ! import jake2.util.Vargs; import java.nio.*; --- 32,36 ---- import jake2.qcommon.*; import jake2.render.*; ! import jake2.util.*; import java.nio.*; *************** *** 39,44 **** import java.util.Vector; - import org.lwjgl.BufferUtils; - /** * Model --- 38,41 ---- *************** *** 1292,1297 **** */ static final int MODEL_BUFFER_SIZE = 50000; ! static FloatBuffer globalModelTextureCoordBuf = BufferUtils.createFloatBuffer(MODEL_BUFFER_SIZE * 2); ! static IntBuffer globalModelVertexIndexBuf = BufferUtils.createIntBuffer(MODEL_BUFFER_SIZE); void precompileGLCmds(qfiles.dmdl_t model) { --- 1289,1294 ---- */ static final int MODEL_BUFFER_SIZE = 50000; ! static FloatBuffer globalModelTextureCoordBuf = Lib.newFloatBuffer(MODEL_BUFFER_SIZE * 2); ! static IntBuffer globalModelVertexIndexBuf = Lib.newIntBuffer(MODEL_BUFFER_SIZE); void precompileGLCmds(qfiles.dmdl_t model) { Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Main.java,v retrieving revision 1.7 retrieving revision 1.7.6.1 diff -C2 -d -r1.7 -r1.7.6.1 *** Main.java 7 May 2005 18:23:25 -0000 1.7 --- Main.java 10 Jul 2005 17:55:50 -0000 1.7.6.1 *************** *** 28,49 **** import jake2.Defines; import jake2.Globals; ! import jake2.client.VID; ! import jake2.client.entity_t; ! import jake2.client.particle_t; ! import jake2.client.refdef_t; ! import jake2.game.Cmd; ! import jake2.game.cplane_t; ! import jake2.game.cvar_t; ! import jake2.qcommon.Com; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.qfiles; ! import jake2.qcommon.xcommand_t; ! import jake2.render.glconfig_t; ! import jake2.render.glstate_t; ! import jake2.render.image_t; ! import jake2.render.mleaf_t; ! import jake2.render.model_t; ! import jake2.util.Math3D; ! import jake2.util.Vargs; import java.awt.Dimension; --- 28,36 ---- import jake2.Defines; import jake2.Globals; ! import jake2.client.*; ! import jake2.game.*; ! import jake2.qcommon.*; ! import jake2.render.*; ! import jake2.util.*; import java.awt.Dimension; *************** *** 51,59 **** import java.nio.IntBuffer; - import org.lwjgl.BufferUtils; - import org.lwjgl.opengl.ARBMultitexture; - import org.lwjgl.opengl.GL11; - import org.lwjgl.opengl.GL13; - /** * Main --- 38,41 ---- *************** *** 124,129 **** */ ! int GL_TEXTURE0 = GL13.GL_TEXTURE0; ! int GL_TEXTURE1 = GL13.GL_TEXTURE1; model_t r_worldmodel; --- 106,111 ---- */ ! int TEXTURE0 = GL_TEXTURE0; ! int TEXTURE1 = GL_TEXTURE1; model_t r_worldmodel; *************** *** 158,162 **** //float r_world_matrix[] = new float[16]; ! FloatBuffer r_world_matrix=BufferUtils.createFloatBuffer(16); float r_base_world_matrix[] = new float[16]; --- 140,144 ---- //float r_world_matrix[] = new float[16]; ! FloatBuffer r_world_matrix = Lib.newFloatBuffer(16); float r_base_world_matrix[] = new float[16]; *************** *** 259,267 **** */ final void R_RotateForEntity(entity_t e) { ! gl.glTranslatef(e.origin[0], e.origin[1], e.origin[2]); ! gl.glRotatef(e.angles[1], 0, 0, 1); ! gl.glRotatef(-e.angles[0], 0, 1, 0); ! gl.glRotatef(-e.angles[2], 1, 0, 0); } --- 241,249 ---- */ final void R_RotateForEntity(entity_t e) { ! glTranslatef(e.origin[0], e.origin[1], e.origin[2]); ! glRotatef(e.angles[1], 0, 0, 1); ! glRotatef(-e.angles[0], 0, 1, 0); ! glRotatef(-e.angles[2], 1, 0, 0); } *************** *** 298,345 **** if (alpha != 1.0F) ! gl.glEnable(GL11.GL_BLEND); ! gl.glColor4f(1, 1, 1, alpha); GL_Bind(currentmodel.skins[e.frame].texnum); ! GL_TexEnv(GL11.GL_MODULATE); if (alpha == 1.0) ! gl.glEnable(GL11.GL_ALPHA_TEST); else ! gl.glDisable(GL11.GL_ALPHA_TEST); ! gl.glBegin(GL11.GL_QUADS); ! gl.glTexCoord2f(0, 1); Math3D.VectorMA(e.origin, -frame.origin_y, vup, point); Math3D.VectorMA(point, -frame.origin_x, vright, point); ! gl.glVertex3f(point[0], point[1], point[2]); ! gl.glTexCoord2f(0, 0); Math3D.VectorMA(e.origin, frame.height - frame.origin_y, vup, point); Math3D.VectorMA(point, -frame.origin_x, vright, point); ! gl.glVertex3f(point[0], point[1], point[2]); ! gl.glTexCoord2f(1, 0); Math3D.VectorMA(e.origin, frame.height - frame.origin_y, vup, point); Math3D.VectorMA(point, frame.width - frame.origin_x, vright, point); ! gl.glVertex3f(point[0], point[1], point[2]); ! gl.glTexCoord2f(1, 1); Math3D.VectorMA(e.origin, -frame.origin_y, vup, point); Math3D.VectorMA(point, frame.width - frame.origin_x, vright, point); ! gl.glVertex3f(point[0], point[1], point[2]); ! gl.glEnd(); ! gl.glDisable(GL11.GL_ALPHA_TEST); ! GL_TexEnv(GL11.GL_REPLACE); if (alpha != 1.0F) ! gl.glDisable(GL11.GL_BLEND); ! gl.glColor4f(1, 1, 1, 1); } --- 280,327 ---- if (alpha != 1.0F) ! glEnable(GL_BLEND); ! glColor4f(1, 1, 1, alpha); GL_Bind(currentmodel.skins[e.frame].texnum); ! GL_TexEnv(GL_MODULATE); if (alpha == 1.0) ! glEnable(GL_ALPHA_TEST); else ! glDisable(GL_ALPHA_TEST); ! glBegin(GL_QUADS); ! glTexCoord2f(0, 1); Math3D.VectorMA(e.origin, -frame.origin_y, vup, point); Math3D.VectorMA(point, -frame.origin_x, vright, point); ! glVertex3f(point[0], point[1], point[2]); ! glTexCoord2f(0, 0); Math3D.VectorMA(e.origin, frame.height - frame.origin_y, vup, point); Math3D.VectorMA(point, -frame.origin_x, vright, poi... [truncated message content] |
From: Carsten W. <ca...@us...> - 2005-07-10 17:53:32
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17941/src/jake2/render Modified Files: Tag: render-refactoring glconfig_t.java Log Message: set a default value (version 1.1) if parsing fails too Index: glconfig_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/glconfig_t.java,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -C2 -d -r1.2 -r1.2.6.1 *** glconfig_t.java 7 May 2005 18:23:26 -0000 1.2 --- glconfig_t.java 10 Jul 2005 17:53:24 -0000 1.2.6.1 *************** *** 37,41 **** public void parseOpenGLVersion() { ! version = Float.parseFloat(version_string.substring(0, 3)); } --- 37,45 ---- public void parseOpenGLVersion() { ! try { ! version = Float.parseFloat(version_string.substring(0, 3)); ! } catch (Exception e) { ! version = 1.1f; ! } } |
From: Carsten W. <ca...@us...> - 2005-07-10 17:51:16
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16428/src/jake2/render Added Files: Tag: render-refactoring QGL.java JoglGL.java LwjglGL.java DummyGL.java Log Message: sub set of OpenGL and the impls (jogl, lwjgl) --- NEW FILE: LwjglGL.java --- package jake2.render; import jake2.render.lwjgl.LWJGLBase; import java.nio.*; import org.lwjgl.util.GL; public class LwjglGL extends LWJGLBase { public final void glAlphaFunc(int func, float ref) { GL.glAlphaFunc(func, ref); } public final void glBegin(int mode) { GL.glBegin(mode); } public final void glBindTexture(int target, int texture) { GL.glBindTexture(target, texture); } public final void glBlendFunc(int sfactor, int dfactor) { GL.glBlendFunc(sfactor, dfactor); } public final void glClear(int mask) { GL.glClear(mask); } public final void glClearColor(float red, float green, float blue, float alpha) { GL.glClearColor(red, green, blue, alpha); } public final void glColor3f(float red, float green, float blue) { GL.glColor3f(red, green, blue); } public final void glColor3ub(byte red, byte green, byte blue) { GL.glColor3ub(red, green, blue); } public final void glColor4f(float red, float green, float blue, float alpha) { GL.glColor4f(red, green, blue, alpha); } public final void glColor4ub(byte red, byte green, byte blue, byte alpha) { GL.glColor4ub(red, green, blue, alpha); } public final void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { GL.glColorPointer(size, unsigned, stride, pointer); } public final void glColorPointer(int size, int stride, FloatBuffer pointer) { GL.glColorPointer(size, stride, pointer); } public final void glCullFace(int mode) { GL.glCullFace(mode); } public final void glDeleteTextures(IntBuffer textures) { GL.glDeleteTextures(textures); } public final void glDepthFunc(int func) { GL.glDepthFunc(func); } public final void glDepthMask(boolean flag) { GL.glDepthMask(flag); } public final void glDepthRange(double zNear, double zFar) { GL.glDepthRange(zNear, zFar); } public final void glDisable(int cap) { GL.glDisable(cap); } public final void glDisableClientState(int cap) { GL.glDisableClientState(cap); } public final void glDrawArrays(int mode, int first, int count) { GL.glDrawArrays(mode, first, count); } public final void glDrawBuffer(int mode) { GL.glDrawBuffer(mode); } public final void glDrawElements(int mode, IntBuffer indices) { GL.glDrawElements(mode, indices); } public final void glEnable(int cap) { GL.glEnable(cap); } public final void glEnableClientState(int cap) { GL.glEnableClientState(cap); } public final void glEnd() { GL.glEnd(); } public final void glFinish() { GL.glFinish(); } public final void glFlush() { GL.glFlush(); } public final void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { GL.glFrustum(left, right, bottom, top, zNear, zFar); } public final int glGetError() { return GL.glGetError(); } public final void glGetFloat(int pname, FloatBuffer params) { GL.glGetFloat(pname, params); } public final String glGetString(int name) { return GL.glGetString(name); } public final void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { GL.glInterleavedArrays(format, stride, pointer); } public final void glLoadIdentity() { GL.glLoadIdentity(); } public final void glLoadMatrix(FloatBuffer m) { GL.glLoadMatrix(m); } public final void glMatrixMode(int mode) { GL.glMatrixMode(mode); } public final void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar) { GL.glOrtho(left, right, bottom, top, zNear, zFar); } public final void glPixelStorei(int pname, int param) { GL.glPixelStorei(pname, param); } public final void glPointSize(float size) { GL.glPointSize(size); } public final void glPolygonMode(int face, int mode) { GL.glPolygonMode(face, mode); } public final void glPopMatrix() { GL.glPopMatrix(); } public final void glPushMatrix() { GL.glPushMatrix(); } public final void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { GL.glReadPixels(x, y, width, height, format, type, pixels); } public final void glRotatef(float angle, float x, float y, float z) { GL.glRotatef(angle, x, y, z); } public final void glScalef(float x, float y, float z) { GL.glScalef(x, y, z); } public final void glScissor(int x, int y, int width, int height) { GL.glScissor(x, y, width, height); } public final void glShadeModel(int mode) { GL.glShadeModel(mode); } public final void glTexCoord2f(float s, float t) { GL.glTexCoord2f(s, t); } public final void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { GL.glTexCoordPointer(size, stride, pointer); } public final void glTexEnvi(int target, int pname, int param) { GL.glTexEnvi(target, pname, param); } public final void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { GL.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } public final void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { GL.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } public final void glTexParameterf(int target, int pname, float param) { GL.glTexParameterf(target, pname, param); } public final void glTexParameteri(int target, int pname, int param) { GL.glTexParameteri(target, pname, param); } public final void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { GL.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); } public final void glTranslatef(float x, float y, float z) { GL.glTranslatef(x, y, z); } public final void glVertex2f(float x, float y) { GL.glVertex2f(x, y); } public final void glVertex3f(float x, float y, float z) { GL.glVertex3f(x, y, z); } public final void glVertexPointer(int size, int stride, FloatBuffer pointer) { GL.glVertexPointer(size, stride, pointer); } public final void glViewport(int x, int y, int width, int height) { GL.glViewport(x, y, width, height); } public final void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { GL.glColorTable(target, internalFormat, width, format, type, data); } public final void glActiveTextureARB(int texture) { GL.glActiveTextureARB(texture); } public final void glClientActiveTextureARB(int texture) { GL.glClientActiveTextureARB(texture); } public final void glPointParameterEXT(int pname, FloatBuffer pfParams) { GL.glPointParameterEXT(pname, pfParams); } public final void glPointParameterfEXT(int pname, float param) { GL.glPointParameterfEXT(pname, param); } } --- NEW FILE: JoglGL.java --- package jake2.render; import java.nio.*; public class JoglGL extends JoglBase { protected void glAlphaFunc(int func, float ref) { gl.glAlphaFunc(func, ref); } protected void glBegin(int mode) { gl.glBegin(mode); } protected void glBindTexture(int target, int texture) { gl.glBindTexture(target, texture); } protected void glBlendFunc(int sfactor, int dfactor) { gl.glBlendFunc(sfactor, dfactor); } protected void glClear(int mask) { gl.glClear(mask); } protected void glClearColor(float red, float green, float blue, float alpha) { gl.glClearColor(red, green, blue, alpha); } protected void glColor3f(float red, float green, float blue) { gl.glColor3f(red, green, blue); } protected void glColor3ub(byte red, byte green, byte blue) { gl.glColor3ub(red, green, blue); } protected void glColor4f(float red, float green, float blue, float alpha) { gl.glColor4f(red, green, blue, alpha); } protected void glColor4ub(byte red, byte green, byte blue, byte alpha) { gl.glColor4ub(red, green, blue, alpha); } protected void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { gl.glColorPointer(size, GL_UNSIGNED_BYTE, stride, pointer); } protected void glColorPointer(int size, int stride, FloatBuffer pointer) { gl.glColorPointer(size, GL_FLOAT, stride, pointer); } protected void glCullFace(int mode) { gl.glCullFace(mode); } protected void glDeleteTextures(IntBuffer textures) { gl.glDeleteTextures(textures.limit(), textures); } protected void glDepthFunc(int func) { gl.glDepthFunc(func); } protected void glDepthMask(boolean flag) { gl.glDepthMask(flag); } protected void glDepthRange(double zNear, double zFar) { gl.glDepthRange(zNear, zFar); } protected void glDisable(int cap) { gl.glDisable(cap); } protected void glDisableClientState(int cap) { gl.glDisableClientState(cap); } protected void glDrawArrays(int mode, int first, int count) { gl.glDrawArrays(mode, first, count); } protected void glDrawBuffer(int mode) { gl.glDrawBuffer(mode); } protected void glDrawElements(int mode, IntBuffer indices) { gl.glDrawElements(mode, indices.limit(), GL_UNSIGNED_INT, indices); } protected void glEnable(int cap) { gl.glEnable(cap); } protected void glEnableClientState(int cap) { gl.glEnableClientState(cap); } protected void glEnd() { gl.glEnd(); } protected void glFinish() { gl.glFinish(); } protected void glFlush() { gl.glFlush(); } protected void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { gl.glFrustum(left, right, bottom, top, zNear, zFar); } protected int glGetError() { return gl.glGetError(); } protected void glGetFloat(int pname, FloatBuffer params) { gl.glGetFloatv(pname, params); } protected String glGetString(int name) { return gl.glGetString(name); } protected void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { gl.glInterleavedArrays(format, stride, pointer); } protected void glLoadIdentity() { gl.glLoadIdentity(); } protected void glLoadMatrix(FloatBuffer m) { gl.glLoadMatrixf(m); } protected void glMatrixMode(int mode) { gl.glMatrixMode(mode); } protected void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar) { gl.glOrtho(left, right, bottom, top, zNear, zFar); } protected void glPixelStorei(int pname, int param) { gl.glPixelStorei(pname, param); } protected void glPointSize(float size) { gl.glPointSize(size); } protected void glPolygonMode(int face, int mode) { gl.glPolygonMode(face, mode); } protected void glPopMatrix() { gl.glPopMatrix(); } protected void glPushMatrix() { gl.glPushMatrix(); } protected void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { gl.glReadPixels(x, y, width, height, format, type, pixels); } protected void glRotatef(float angle, float x, float y, float z) { gl.glRotatef(angle, x, y, z); } protected void glScalef(float x, float y, float z) { gl.glScalef(x, y, z); } protected void glScissor(int x, int y, int width, int height) { gl.glScissor(x, y, width, height); } protected void glShadeModel(int mode) { gl.glShadeModel(mode); } protected void glTexCoord2f(float s, float t) { gl.glTexCoord2f(s, t); } protected void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { gl.glTexCoordPointer(size, GL_FLOAT, stride, pointer); } protected void glTexEnvi(int target, int pname, int param) { gl.glTexEnvi(target, pname, param); } protected void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { gl.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } protected void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { gl.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } protected void glTexParameterf(int target, int pname, float param) { gl.glTexParameterf(target, pname, param); } protected void glTexParameteri(int target, int pname, int param) { gl.glTexParameteri(target, pname, param); } protected void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { gl.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); } protected void glTranslatef(float x, float y, float z) { gl.glTranslatef(x, y, z); } protected void glVertex2f(float x, float y) { gl.glVertex2f(x, y); } protected void glVertex3f(float x, float y, float z) { gl.glVertex3f(x, y, z); } protected void glVertexPointer(int size, int stride, FloatBuffer pointer) { gl.glVertexPointer(size, GL_FLOAT, stride, pointer); } protected void glViewport(int x, int y, int width, int height) { gl.glViewport(x, y, width, height); } protected void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { gl.glColorTable(target, internalFormat, width, format, type, data); } protected void glActiveTextureARB(int texture) { gl.glActiveTextureARB(texture); } protected void glClientActiveTextureARB(int texture) { gl.glClientActiveTextureARB(texture); } protected void glPointParameterEXT(int pname, FloatBuffer pfParams) { gl.glPointParameterfvEXT(pname, pfParams); } protected void glPointParameterfEXT(int pname, float param) { gl.glPointParameterfEXT(pname, param); } } --- NEW FILE: QGL.java --- package jake2.render; import java.nio.*; public abstract class QGL { /* * alpha functions */ public static final int GL_NEVER = 0x0200; public static final int GL_LESS = 0x0201; public static final int GL_EQUAL = 0x0202; public static final int GL_LEQUAL = 0x0203; public static final int GL_GREATER = 0x0204; public static final int GL_NOTEQUAL = 0x0205; public static final int GL_GEQUAL = 0x0206; public static final int GL_ALWAYS = 0x0207; /* * attribute masks */ public static final int GL_DEPTH_BUFFER_BIT = 0x00000100; public static final int GL_STENCIL_BUFFER_BIT = 0x00000400; public static final int GL_COLOR_BUFFER_BIT = 0x00004000; /* * begin modes */ public static final int GL_POINTS = 0x0000; public static final int GL_LINES = 0x0001; public static final int GL_LINE_LOOP = 0x0002; public static final int GL_LINE_STRIP = 0x0003; public static final int GL_TRIANGLES = 0x0004; public static final int GL_TRIANGLE_STRIP = 0x0005; public static final int GL_TRIANGLE_FAN = 0x0006; public static final int GL_QUADS = 0x0007; public static final int GL_QUAD_STRIP = 0x0008; public static final int GL_POLYGON = 0x0009; /* * blending factors */ public static final int GL_ZERO = 0; public static final int GL_ONE = 1; public static final int GL_SRC_COLOR = 0x0300; public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301; public static final int GL_SRC_ALPHA = 0x0302; public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303; public static final int GL_DST_ALPHA = 0x0304; public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305; /* * boolean */ public static final int GL_TRUE = 1; public static final int GL_FALSE = 0; /* * data types */ public static final int GL_BYTE = 0x1400; public static final int GL_UNSIGNED_BYTE = 0x1401; public static final int GL_SHORT = 0x1402; public static final int GL_UNSIGNED_SHORT = 0x1403; public static final int GL_INT = 0x1404; public static final int GL_UNSIGNED_INT = 0x1405; public static final int GL_FLOAT = 0x1406; /* * draw buffer modes */ public static final int GL_FRONT = 0x0404; public static final int GL_BACK = 0x0405; public static final int GL_FRONT_AND_BACK = 0x0408; /* * errors */ public static final int GL_NO_ERROR = 0; public static final int GL_POINT_SMOOTH = 0x0B10; public static final int GL_CULL_FACE = 0x0B44; public static final int GL_DEPTH_TEST = 0x0B71; public static final int GL_MODELVIEW_MATRIX = 0x0BA6; public static final int GL_ALPHA_TEST = 0x0BC0; public static final int GL_BLEND = 0x0BE2; public static final int GL_SCISSOR_TEST = 0x0C11; public static final int GL_PACK_ALIGNMENT = 0x0D05; public static final int GL_TEXTURE_2D = 0x0DE1; /* * hint modes */ public static final int GL_DONT_CARE = 0x1100; public static final int GL_FASTEST = 0x1101; public static final int GL_NICEST = 0x1102; /* * matrix modes */ public static final int GL_MODELVIEW = 0x1700; public static final int GL_PROJECTION = 0x1701; /* * pixel formats */ public static final int GL_COLOR_INDEX = 0x1900; public static final int GL_RED = 0x1903; public static final int GL_GREEN = 0x1904; public static final int GL_BLUE = 0x1905; public static final int GL_ALPHA = 0x1906; public static final int GL_RGB = 0x1907; public static final int GL_RGBA = 0x1908; public static final int GL_LUMINANCE = 0x1909; public static final int GL_LUMINANCE_ALPHA = 0x190A; /* * polygon modes */ public static final int GL_POINT = 0x1B00; public static final int GL_LINE = 0x1B01; public static final int GL_FILL = 0x1B02; /* * shading models */ public static final int GL_FLAT = 0x1D00; public static final int GL_SMOOTH = 0x1D01; public static final int GL_REPLACE = 0x1E01; /* * string names */ public static final int GL_VENDOR = 0x1F00; public static final int GL_RENDERER = 0x1F01; public static final int GL_VERSION = 0x1F02; public static final int GL_EXTENSIONS = 0x1F03; /* * TextureEnvMode */ public static final int GL_MODULATE = 0x2100; /* * TextureEnvParameter */ public static final int GL_TEXTURE_ENV_MODE = 0x2200; public static final int GL_TEXTURE_ENV_COLOR = 0x2201; /* * TextureEnvTarget */ public static final int GL_TEXTURE_ENV = 0x2300; public static final int GL_NEAREST = 0x2600; public static final int GL_LINEAR = 0x2601; public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700; public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701; public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702; public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703; /* * TextureParameterName */ public static final int GL_TEXTURE_MAG_FILTER = 0x2800; public static final int GL_TEXTURE_MIN_FILTER = 0x2801; public static final int GL_TEXTURE_WRAP_S = 0x2802; public static final int GL_TEXTURE_WRAP_T = 0x2803; /* * TextureWrapMode */ public static final int GL_CLAMP = 0x2900; public static final int GL_REPEAT = 0x2901; /* * texture */ public static final int GL_LUMINANCE8 = 0x8040; public static final int GL_INTENSITY8 = 0x804B; public static final int GL_R3_G3_B2 = 0x2A10; public static final int GL_RGB4 = 0x804F; public static final int GL_RGB5 = 0x8050; public static final int GL_RGB8 = 0x8051; public static final int GL_RGBA2 = 0x8055; public static final int GL_RGBA4 = 0x8056; public static final int GL_RGB5_A1 = 0x8057; public static final int GL_RGBA8 = 0x8058; /* * vertex arrays */ public static final int GL_VERTEX_ARRAY = 0x8074; public static final int GL_COLOR_ARRAY = 0x8076; public static final int GL_TEXTURE_COORD_ARRAY = 0x8078; public static final int GL_T2F_V3F = 0x2A27; /* * OpenGL 1.2, 1.3 constants */ public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; public static final int GL_TEXTURE0 = 0x84C0; public static final int GL_TEXTURE1 = 0x84C1; public static final int GL_TEXTURE0_ARB = 0x84C0; public static final int GL_TEXTURE1_ARB = 0x84C1; public static final int GL_BGR = 0x80E0; public static final int GL_BGRA = 0x80E1; /* * point parameters */ public static final int GL_POINT_SIZE_MIN_EXT = 0x8126; public static final int GL_POINT_SIZE_MAX_EXT = 0x8127; public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128; public static final int GL_DISTANCE_ATTENUATION_EXT = 0x8129; /* * a sub set of OpenGL for Jake2 */ protected abstract void glAlphaFunc(int func, float ref); protected abstract void glBegin(int mode); protected abstract void glBindTexture(int target, int texture); protected abstract void glBlendFunc(int sfactor, int dfactor); protected abstract void glClear(int mask); protected abstract void glClearColor(float red, float green, float blue, float alpha); protected abstract void glColor3f(float red, float green, float blue); protected abstract void glColor3ub(byte red, byte green, byte blue); protected abstract void glColor4f(float red, float green, float blue, float alpha); protected abstract void glColor4ub(byte red, byte green, byte blue, byte alpha); protected abstract void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer); protected abstract void glColorPointer(int size, int stride, FloatBuffer pointer); protected abstract void glCullFace(int mode); protected abstract void glDeleteTextures(IntBuffer textures); protected abstract void glDepthFunc(int func); protected abstract void glDepthMask(boolean flag); protected abstract void glDepthRange(double zNear, double zFar); protected abstract void glDisable(int cap); protected abstract void glDisableClientState(int cap); protected abstract void glDrawArrays(int mode, int first, int count); protected abstract void glDrawBuffer(int mode); protected abstract void glDrawElements(int mode, IntBuffer indices); protected abstract void glEnable(int cap); protected abstract void glEnableClientState(int cap); protected abstract void glEnd(); protected abstract void glFinish(); protected abstract void glFlush(); protected abstract void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar); protected abstract int glGetError(); protected abstract void glGetFloat(int pname, FloatBuffer params); protected abstract String glGetString(int name); protected abstract void glInterleavedArrays(int format, int stride, FloatBuffer pointer); protected abstract void glLoadIdentity(); protected abstract void glLoadMatrix(FloatBuffer m); protected abstract void glMatrixMode(int mode); protected abstract void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar); protected abstract void glPixelStorei(int pname, int param); protected abstract void glPointSize(float size); protected abstract void glPolygonMode(int face, int mode); protected abstract void glPopMatrix(); protected abstract void glPushMatrix(); protected abstract void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels); protected abstract void glRotatef(float angle, float x, float y, float z); protected abstract void glScalef(float x, float y, float z); protected abstract void glScissor(int x, int y, int width, int height); protected abstract void glShadeModel(int mode); protected abstract void glTexCoord2f(float s, float t); protected abstract void glTexCoordPointer(int size, int stride, FloatBuffer pointer); protected abstract void glTexEnvi(int target, int pname, int param); protected abstract void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels); protected abstract void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels); protected abstract void glTexParameterf(int target, int pname, float param); protected abstract void glTexParameteri(int target, int pname, int param); protected abstract void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels); protected abstract void glTranslatef(float x, float y, float z); protected abstract void glVertex2f(float x, float y); protected abstract void glVertex3f(float x, float y, float z); protected abstract void glVertexPointer(int size, int stride, FloatBuffer pointer); protected abstract void glViewport(int x, int y, int width, int height); protected abstract void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data); protected abstract void glActiveTextureARB(int texture); protected abstract void glClientActiveTextureARB(int texture); protected abstract void glPointParameterEXT(int pname, FloatBuffer pfParams); protected abstract void glPointParameterfEXT(int pname, float param); } --- NEW FILE: DummyGL.java --- package jake2.render; import jake2.render.lwjgl.LWJGLBase; import java.nio.*; public class DummyGL extends LWJGLBase { protected void glAlphaFunc(int func, float ref) { // do nothing } protected void glBegin(int mode) { // do nothing } protected void glBindTexture(int target, int texture) { // do nothing } protected void glBlendFunc(int sfactor, int dfactor) { // do nothing } protected void glClear(int mask) { // do nothing } protected void glClearColor(float red, float green, float blue, float alpha) { // do nothing } protected void glColor3f(float red, float green, float blue) { // do nothing } protected void glColor3ub(byte red, byte green, byte blue) { // do nothing } protected void glColor4f(float red, float green, float blue, float alpha) { // do nothing } protected void glColor4ub(byte red, byte green, byte blue, byte alpha) { // do nothing } protected void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { // do nothing } protected void glColorPointer(int size, int stride, FloatBuffer pointer) { // do nothing } protected void glCullFace(int mode) { // do nothing } protected void glDeleteTextures(IntBuffer textures) { // do nothing } protected void glDepthFunc(int func) { // do nothing } protected void glDepthMask(boolean flag) { // do nothing } protected void glDepthRange(double zNear, double zFar) { // do nothing } protected void glDisable(int cap) { // do nothing } protected void glDisableClientState(int cap) { // do nothing } protected void glDrawArrays(int mode, int first, int count) { // do nothing } protected void glDrawBuffer(int mode) { // do nothing } protected void glDrawElements(int mode, IntBuffer indices) { // do nothing } protected void glEnable(int cap) { // do nothing } protected void glEnableClientState(int cap) { // do nothing } protected void glEnd() { // do nothing } protected void glFinish() { // do nothing } protected void glFlush() { // do nothing } protected void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { // do nothing } protected int glGetError() { return GL_NO_ERROR; } protected void glGetFloat(int pname, FloatBuffer params) { // do nothing } protected String glGetString(int name) { switch (name) { case GL_EXTENSIONS: return "GL_ARB_multitexture"; default: return ""; } } protected void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { // do nothing } protected void glLoadIdentity() { // do nothing } protected void glLoadMatrix(FloatBuffer m) { // do nothing } protected void glMatrixMode(int mode) { // do nothing } protected void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar) { // do nothing } protected void glPixelStorei(int pname, int param) { // do nothing } protected void glPointSize(float size) { // do nothing } protected void glPolygonMode(int face, int mode) { // do nothing } protected void glPopMatrix() { // do nothing } protected void glPushMatrix() { // do nothing } protected void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { // do nothing } protected void glRotatef(float angle, float x, float y, float z) { // do nothing } protected void glScalef(float x, float y, float z) { // do nothing } protected void glScissor(int x, int y, int width, int height) { // do nothing } protected void glShadeModel(int mode) { // do nothing } protected void glTexCoord2f(float s, float t) { // do nothing } protected void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { // do nothing } protected void glTexEnvi(int target, int pname, int param) { // do nothing } protected void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { // do nothing } protected void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { // do nothing } protected void glTexParameterf(int target, int pname, float param) { // do nothing } protected void glTexParameteri(int target, int pname, int param) { // do nothing } protected void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { // do nothing } protected void glTranslatef(float x, float y, float z) { // do nothing } protected void glVertex2f(float x, float y) { // do nothing } protected void glVertex3f(float x, float y, float z) { // do nothing } protected void glVertexPointer(int size, int stride, FloatBuffer pointer) { // do nothing } protected void glViewport(int x, int y, int width, int height) { // do nothing } protected void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { // do nothing } protected void glActiveTextureARB(int texture) { // do nothing } protected void glClientActiveTextureARB(int texture) { // do nothing } protected void glPointParameterEXT(int pname, FloatBuffer pfParams) { // do nothing } protected void glPointParameterfEXT(int pname, float param) { // do nothing } } |
From: Carsten W. <ca...@us...> - 2005-07-10 17:48:11
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14799 Modified Files: Tag: render-refactoring .cvsignore Log Message: ignore directory doc (javadoc) Index: .cvsignore =================================================================== RCS file: /cvsroot/jake2/jake2/.cvsignore,v retrieving revision 1.4 retrieving revision 1.4.10.1 diff -C2 -d -r1.4 -r1.4.10.1 *** .cvsignore 19 Oct 2004 09:34:15 -0000 1.4 --- .cvsignore 10 Jul 2005 17:48:00 -0000 1.4.10.1 *************** *** 6,7 **** --- 6,8 ---- *.jar *.map + doc |
From: Carsten W. <ca...@us...> - 2005-07-10 17:47:39
|
Update of /cvsroot/jake2/jake2/.settings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14560/.settings Added Files: Tag: render-refactoring org.eclipse.jdt.ui.prefs org.eclipse.jdt.core.prefs Log Message: my eclipse3.1 settings --- NEW FILE: org.eclipse.jdt.core.prefs --- #Sat Jul 09 19:19:31 CEST 2005 eclipse.preferences.version=1 org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort org.eclipse.jdt.core.circularClasspath=error org.eclipse.jdt.core.classpath.exclusionPatterns=enabled org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedImport=ignore org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=1 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false org.eclipse.jdt.core.formatter.comment.format_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=4 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=80 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.incompatibleJDKLevel=ignore org.eclipse.jdt.core.incompleteClasspath=error --- NEW FILE: org.eclipse.jdt.ui.prefs --- #Thu Jun 30 01:35:22 CEST 2005 eclipse.preferences.version=1 formatter_settings_version=8 internal.default.compliance=default org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/> |
From: Carsten W. <ca...@us...> - 2005-07-10 17:46:46
|
Update of /cvsroot/jake2/jake2/.settings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14126/.settings Log Message: Directory /cvsroot/jake2/jake2/.settings added to the repository --> Using per-directory sticky tag `render-refactoring' |
From: Holger Z. <hz...@us...> - 2005-07-01 14:24:53
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32511 Modified Files: README README_DE Log Message: new build requirements Index: README =================================================================== RCS file: /cvsroot/jake2/jake2/README,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** README 26 May 2005 16:56:31 -0000 1.8 --- README 1 Jul 2005 14:24:45 -0000 1.9 *************** *** 18,22 **** 400 MHz CPU Geforce2 MX or better graphics accelerator ! JRE 1.4 or higher Installation --- 18,23 ---- 400 MHz CPU Geforce2 MX or better graphics accelerator ! at least JRE 1.4 to run Jake2 ! at least JDK 1.5 to build Jake2 from source Installation *************** *** 33,37 **** build from source: - unpack jake2src-version.tar.gz or jake2-version.zip ! - set JAVA_HOME environment variable to Your J2SDK1.4 installation - run "build.sh installer" or "build.bat installer" to build the installer --- 34,38 ---- build from source: - unpack jake2src-version.tar.gz or jake2-version.zip ! - set JAVA_HOME environment variable to Your JDK1.5 installation - run "build.sh installer" or "build.bat installer" to build the installer Index: README_DE =================================================================== RCS file: /cvsroot/jake2/jake2/README_DE,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** README_DE 26 May 2005 16:56:31 -0000 1.7 --- README_DE 1 Jul 2005 14:24:45 -0000 1.8 *************** *** 24,27 **** --- 24,28 ---- Geforce2 MX oder bessere Grafikkarte JRE 1.4.2 + JDK 1.5 zum Übersetzen der Jake2 Quellen Installation *************** *** 38,42 **** ausgehend von Sourcedistribution: - jake2src-version.tar.gz oder jake2src-version.zip entpacken ! - JAVA_HOME Umgebungsvariable auf J2SDK1.4 Installationsverzeichnis setzen - "build.sh installer" oder "build.bat installer" erzeugt den Installer --- 39,43 ---- ausgehend von Sourcedistribution: - jake2src-version.tar.gz oder jake2src-version.zip entpacken ! - JAVA_HOME Umgebungsvariable auf JDK1.5 Installationsverzeichnis setzen - "build.sh installer" oder "build.bat installer" erzeugt den Installer |
From: Holger Z. <hz...@us...> - 2005-07-01 14:21:33
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30655/src/jake2/client Modified Files: CL.java V.java Menu.java SCR.java Log Message: remove timer hack and use new Timer classes Index: Menu.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Menu.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Menu.java 9 Feb 2005 20:47:30 -0000 1.18 --- Menu.java 1 Jul 2005 14:20:50 -0000 1.19 *************** *** 31,34 **** --- 31,35 ---- import jake2.qcommon.*; import jake2.sound.S; + import jake2.sys.*; import jake2.sys.NET; import jake2.sys.Sys; *************** *** 777,781 **** re.DrawChar(menu.x, menu.y + menu.cursor * 9, '='); else ! re.DrawChar(menu.x, menu.y + menu.cursor * 9, 12 + ((int) (Sys .Milliseconds() / 250) & 1)); } --- 778,782 ---- re.DrawChar(menu.x, menu.y + menu.cursor * 9, '='); else ! re.DrawChar(menu.x, menu.y + menu.cursor * 9, 12 + ((int) (Timer .Milliseconds() / 250) & 1)); } *************** *** 4406,4410 **** offset = f.cursor; ! if ((((int) (Sys.Milliseconds() / 250)) & 1) != 0) { re.DrawChar(f.x + f.parent.x + (offset + 2) * 8 + 8, f.y + f.parent.y, 11); --- 4407,4411 ---- offset = f.cursor; ! if ((((int) (Timer.Milliseconds() / 250)) & 1) != 0) { re.DrawChar(f.x + f.parent.x + (offset + 2) * 8 + 8, f.y + f.parent.y, 11); *************** *** 4649,4656 **** if ((item.flags & QMF_LEFT_JUSTIFY) != 0) { re.DrawChar(menu.x + item.x - 24 + item.cursor_offset, menu.y ! + item.y, 12 + ((int) (Sys.Milliseconds() / 250) & 1)); } else { re.DrawChar(menu.x + item.cursor_offset, menu.y + item.y, ! 12 + ((int) (Sys.Milliseconds() / 250) & 1)); } } --- 4650,4657 ---- if ((item.flags & QMF_LEFT_JUSTIFY) != 0) { re.DrawChar(menu.x + item.x - 24 + item.cursor_offset, menu.y ! + item.y, 12 + ((int) (Timer.Milliseconds() / 250) & 1)); } else { re.DrawChar(menu.x + item.cursor_offset, menu.y + item.y, ! 12 + ((int) (Timer.Milliseconds() / 250) & 1)); } } Index: V.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/V.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** V.java 20 Jan 2005 23:15:23 -0000 1.4 --- V.java 1 Jul 2005 14:20:50 -0000 1.5 *************** *** 30,34 **** import jake2.game.cvar_t; import jake2.qcommon.*; ! import jake2.sys.Sys; import jake2.util.Math3D; import jake2.util.Vargs; --- 30,34 ---- import jake2.game.cvar_t; import jake2.qcommon.*; ! import jake2.sys.Timer; import jake2.util.Math3D; import jake2.util.Vargs; *************** *** 284,288 **** if (cl_timedemo.value != 0.0f) { if (cl.timedemo_start == 0) ! cl.timedemo_start = Sys.Milliseconds(); cl.timedemo_frames++; } --- 284,288 ---- if (cl_timedemo.value != 0.0f) { if (cl.timedemo_start == 0) ! cl.timedemo_start = Timer.Milliseconds(); cl.timedemo_frames++; } Index: SCR.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/SCR.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SCR.java 8 Feb 2005 20:33:33 -0000 1.14 --- SCR.java 1 Jul 2005 14:20:52 -0000 1.15 *************** *** 32,37 **** import jake2.game.cvar_t; import jake2.qcommon.*; ! import jake2.sound.*; ! import jake2.sys.Sys; import jake2.util.Lib; import jake2.util.Vargs; --- 32,37 ---- import jake2.game.cvar_t; import jake2.qcommon.*; ! import jake2.sound.S; ! import jake2.sys.Timer; import jake2.util.Lib; import jake2.util.Vargs; *************** *** 589,593 **** UpdateScreen(); ! cls.disable_screen = Sys.Milliseconds(); cls.disable_servercount = cl.servercount; } --- 589,593 ---- UpdateScreen(); ! cls.disable_screen = Timer.Milliseconds(); cls.disable_servercount = cl.servercount; } *************** *** 619,623 **** return; ! start = Sys.Milliseconds(); if (Cmd.Argc() == 2) { // run without page flipping --- 619,623 ---- return; ! start = Timer.Milliseconds(); if (Cmd.Argc() == 2) { // run without page flipping *************** *** 638,642 **** } ! stop = Sys.Milliseconds(); time = (stop - start) / 1000.0f; Com.Printf("%f seconds (%f fps)\n", new Vargs(2).add(time).add( --- 638,642 ---- } ! stop = Timer.Milliseconds(); time = (stop - start) / 1000.0f; Com.Printf("%f seconds (%f fps)\n", new Vargs(2).add(time).add( *************** *** 1179,1183 **** // do nothing at all if (cls.disable_screen != 0) { ! if (Sys.Milliseconds() - cls.disable_screen > 120000) { cls.disable_screen = 0; Com.Printf("Loading plaque timed out.\n"); --- 1179,1183 ---- // do nothing at all if (cls.disable_screen != 0) { ! if (Timer.Milliseconds() - cls.disable_screen > 120000) { cls.disable_screen = 0; Com.Printf("Loading plaque timed out.\n"); Index: CL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** CL.java 7 Jun 2005 12:57:21 -0000 1.22 --- CL.java 1 Jul 2005 14:20:48 -0000 1.23 *************** *** 733,737 **** int time; ! time = (int) (Sys.Milliseconds() - Globals.cl.timedemo_start); if (time > 0) Com.Printf("%i frames, %3.1f seconds: %3.1f fps\n", --- 733,737 ---- int time; ! time = (int) (Timer.Milliseconds() - Globals.cl.timedemo_start); if (time > 0) Com.Printf("%i frames, %3.1f seconds: %3.1f fps\n", *************** *** 1277,1281 **** public static void InitLocal() { Globals.cls.state = Defines.ca_disconnected; ! Globals.cls.realtime = Sys.Milliseconds(); CL_input.InitInput(); --- 1277,1281 ---- public static void InitLocal() { Globals.cls.state = Defines.ca_disconnected; ! Globals.cls.realtime = Timer.Milliseconds(); CL_input.InitInput(); *************** *** 1543,1547 **** // if in the debugger last frame, don't timeout if (msec > 5000) ! Globals.cls.netchan.last_received = Sys.Milliseconds(); // fetch results from server --- 1543,1547 ---- // if in the debugger last frame, don't timeout if (msec > 5000) ! Globals.cls.netchan.last_received = Timer.Milliseconds(); // fetch results from server |
From: Holger Z. <hz...@us...> - 2005-07-01 14:21:11
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30655/src/jake2/sys Modified Files: LWJGLKBD.java JOGLKBD.java Timer.java Sys.java Log Message: remove timer hack and use new Timer classes Index: JOGLKBD.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/JOGLKBD.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** JOGLKBD.java 6 Jun 2005 13:32:06 -0000 1.7 --- JOGLKBD.java 1 Jul 2005 14:20:54 -0000 1.8 *************** *** 210,214 **** public void Do_Key_Event(int key, boolean down) { ! Key.Event(key, down, Sys.Milliseconds()); } --- 210,214 ---- public void Do_Key_Event(int key, boolean down) { ! Key.Event(key, down, Timer.Milliseconds()); } Index: Timer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/Timer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Timer.java 1 Jul 2005 14:11:01 -0000 1.1 --- Timer.java 1 Jul 2005 14:20:54 -0000 1.2 *************** *** 8,11 **** --- 8,12 ---- import jake2.Globals; + import jake2.qcommon.Com; *************** *** 27,31 **** } } ! System.out.println("using " + t.getClass().getName()); } --- 28,32 ---- } } ! Com.Println("using " + t.getClass().getName()); } Index: LWJGLKBD.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/LWJGLKBD.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** LWJGLKBD.java 7 Jun 2005 08:43:43 -0000 1.9 --- LWJGLKBD.java 1 Jul 2005 14:20:54 -0000 1.10 *************** *** 36,40 **** mouseHasTwoButtons = (Mouse.getButtonCount() == 2); ! lastRepeat = Sys.Milliseconds(); } catch (Exception e) {;} } --- 36,40 ---- mouseHasTwoButtons = (Mouse.getButtonCount() == 2); ! lastRepeat = Timer.Milliseconds(); } catch (Exception e) {;} } *************** *** 208,212 **** public void Do_Key_Event(int key, boolean down) { ! Key.Event(key, down, Sys.Milliseconds()); } --- 208,212 ---- public void Do_Key_Event(int key, boolean down) { ! Key.Event(key, down, Timer.Milliseconds()); } Index: Sys.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/Sys.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Sys.java 14 Dec 2004 00:11:01 -0000 1.10 --- Sys.java 1 Jul 2005 14:20:54 -0000 1.11 *************** *** 182,190 **** } - private static long secbase = System.currentTimeMillis(); - - public static int Milliseconds() { - return Globals.curtime = (int) (System.currentTimeMillis() - secbase); - } //============================================ --- 182,185 ---- *************** *** 231,235 **** // grab frame time ! Globals.sys_frame_time = Sys.Milliseconds(); } --- 226,230 ---- // grab frame time ! Globals.sys_frame_time = Timer.Milliseconds(); } |
From: Holger Z. <hz...@us...> - 2005-07-01 14:21:07
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30655/src/jake2/qcommon Modified Files: Netchan.java Qcommon.java Log Message: remove timer hack and use new Timer classes Index: Qcommon.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Qcommon.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Qcommon.java 28 Jun 2005 08:41:19 -0000 1.18 --- Qcommon.java 1 Jul 2005 14:20:56 -0000 1.19 *************** *** 31,34 **** --- 31,35 ---- import jake2.game.Cmd; import jake2.server.SV_MAIN; + import jake2.sys.*; import jake2.sys.NET; import jake2.sys.Sys; *************** *** 213,217 **** if (Globals.host_speeds.value != 0.0f) ! time_before= Sys.Milliseconds(); Com.debugContext = "SV:"; --- 214,218 ---- if (Globals.host_speeds.value != 0.0f) ! time_before= Timer.Milliseconds(); Com.debugContext = "SV:"; *************** *** 219,223 **** if (Globals.host_speeds.value != 0.0f) ! time_between= Sys.Milliseconds(); Com.debugContext = "CL:"; --- 220,224 ---- if (Globals.host_speeds.value != 0.0f) ! time_between= Timer.Milliseconds(); Com.debugContext = "CL:"; *************** *** 225,229 **** if (Globals.host_speeds.value != 0.0f) { ! time_after= Sys.Milliseconds(); int all= time_after - time_before; --- 226,230 ---- if (Globals.host_speeds.value != 0.0f) { ! time_after= Timer.Milliseconds(); int all= time_after - time_before; Index: Netchan.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Netchan.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Netchan.java 17 Jan 2005 21:55:45 -0000 1.5 --- Netchan.java 1 Jul 2005 14:20:56 -0000 1.6 *************** *** 31,35 **** import jake2.server.SV_MAIN; import jake2.sys.NET; ! import jake2.sys.Sys; /** --- 31,35 ---- import jake2.server.SV_MAIN; import jake2.sys.NET; ! import jake2.sys.Timer; /** *************** *** 112,116 **** // pick a port value that should be nice and random ! port = Sys.Milliseconds() & 0xffff; showpackets = Cvar.Get("showpackets", "0", 0); --- 112,116 ---- // pick a port value that should be nice and random ! port = Timer.Milliseconds() & 0xffff; showpackets = Cvar.Get("showpackets", "0", 0); |
From: Holger Z. <hz...@us...> - 2005-07-01 14:21:07
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30655/src/jake2/server Modified Files: SV_MAIN.java Log Message: remove timer hack and use new Timer classes Index: SV_MAIN.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_MAIN.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SV_MAIN.java 19 Feb 2005 21:22:34 -0000 1.10 --- SV_MAIN.java 1 Jul 2005 14:20:55 -0000 1.11 *************** *** 25,43 **** import jake2.Defines; import jake2.Globals; ! import jake2.game.Cmd; ! import jake2.game.GameBase; ! import jake2.game.Info; ! import jake2.game.PlayerClient; ! import jake2.game.cvar_t; ! import jake2.game.edict_t; ! import jake2.qcommon.Com; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.FS; ! import jake2.qcommon.MSG; ! import jake2.qcommon.Netchan; ! import jake2.qcommon.SZ; ! import jake2.qcommon.netadr_t; import jake2.sys.NET; ! import jake2.sys.Sys; import jake2.util.Lib; --- 25,32 ---- import jake2.Defines; import jake2.Globals; ! import jake2.game.*; ! import jake2.qcommon.*; import jake2.sys.NET; ! import jake2.sys.Timer; import jake2.util.Lib; *************** *** 716,720 **** public static void SV_RunGameFrame() { if (Globals.host_speeds.value != 0) ! Globals.time_before_game = Sys.Milliseconds(); // we always need to bump framenum, even if we --- 705,709 ---- public static void SV_RunGameFrame() { if (Globals.host_speeds.value != 0) ! Globals.time_before_game = Timer.Milliseconds(); // we always need to bump framenum, even if we *************** *** 738,742 **** if (Globals.host_speeds.value != 0) ! Globals.time_after_game = Sys.Milliseconds(); } --- 727,731 ---- if (Globals.host_speeds.value != 0) ! Globals.time_after_game = Timer.Milliseconds(); } |