From: Holger Z. <hz...@us...> - 2004-12-13 21:40:55
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1434/src/jake2/client Modified Files: Tag: LWJGL_IMPORT VID.java V.java particle_t.java refexport_t.java Log Message: import of LWJGL code Index: particle_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/particle_t.java,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.1.2.1 diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.1.2.1 *** particle_t.java 9 Jul 2004 08:38:23 -0000 1.1.1.1.2.1 --- particle_t.java 13 Dec 2004 21:40:45 -0000 1.1.1.1.2.1.2.1 *************** *** 32,36 **** public static FloatBuffer vertexArray = Lib.newFloatBuffer(Defines.MAX_PARTICLES * 3); ! public static IntBuffer colorArray = Lib.newIntBuffer(Defines.MAX_PARTICLES, ByteOrder.LITTLE_ENDIAN); public static int[] colorTable = new int[256]; --- 32,37 ---- public static FloatBuffer vertexArray = Lib.newFloatBuffer(Defines.MAX_PARTICLES * 3); ! //public static IntBuffer colorArray = Lib.newIntBuffer(Defines.MAX_PARTICLES, ByteOrder.LITTLE_ENDIAN); ! public static ByteBuffer colorArray = Lib.newByteBuffer(Defines.MAX_PARTICLES*Lib.SIZEOF_INT, ByteOrder.LITTLE_ENDIAN); public static int[] colorTable = new int[256]; Index: VID.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/VID.java,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.2.2.1 diff -C2 -d -r1.4.2.2 -r1.4.2.2.2.1 *** VID.java 6 Sep 2004 19:39:13 -0000 1.4.2.2 --- VID.java 13 Dec 2004 21:40:45 -0000 1.4.2.2.2.1 *************** *** 34,38 **** import jake2.sound.S; import jake2.sys.IN; - import jake2.sys.KBD; import jake2.util.Vargs; --- 34,37 ---- *************** *** 156,160 **** { if (Globals.re != null) { ! KBD.Close(); IN.Shutdown(); } --- 155,159 ---- { if (Globals.re != null) { ! Globals.re.getKeyboardHandler().Close(); IN.Shutdown(); } *************** *** 174,178 **** if ( reflib_active ) { ! KBD.Close(); IN.Shutdown(); --- 173,177 ---- if ( reflib_active ) { ! Globals.re.getKeyboardHandler().Close(); IN.Shutdown(); *************** *** 222,226 **** /* Init KBD */ ! KBD.Init(); Com.Printf( "------------------------------------\n"); --- 221,225 ---- /* Init KBD */ ! Globals.re.getKeyboardHandler().Init(); Com.Printf( "------------------------------------\n"); *************** *** 296,300 **** { /* Create the video variables so we know how to start the graphics drivers */ ! vid_ref = Cvar.Get("vid_ref", "fastjogl", CVAR_ARCHIVE); vid_xpos = Cvar.Get("vid_xpos", "3", CVAR_ARCHIVE); vid_ypos = Cvar.Get("vid_ypos", "22", CVAR_ARCHIVE); --- 295,300 ---- { /* Create the video variables so we know how to start the graphics drivers */ ! //vid_ref = Cvar.Get("vid_ref", "fastjogl", CVAR_ARCHIVE); ! vid_ref = Cvar.Get("vid_ref", "lwjgl", CVAR_ARCHIVE); vid_xpos = Cvar.Get("vid_xpos", "3", CVAR_ARCHIVE); vid_ypos = Cvar.Get("vid_ypos", "22", CVAR_ARCHIVE); *************** *** 330,334 **** if ( reflib_active ) { ! KBD.Close(); IN.Shutdown(); --- 330,334 ---- if ( reflib_active ) { ! Globals.re.getKeyboardHandler().Close(); IN.Shutdown(); *************** *** 346,349 **** --- 346,350 ---- static final int REF_OPENGL_JOGL = 0; static final int REF_OPENGL_FASTJOGL =1; + static final int REF_OPENGL_LWJGL =2; static cvar_t gl_mode; *************** *** 532,535 **** --- 533,542 ---- vid_ref.modified = true; break; + case REF_OPENGL_LWJGL : + Cvar.Set( "vid_ref", "lwjgl" ); + Cvar.Set( "gl_driver", "lwjgl" ); + if (gl_driver.modified) + vid_ref.modified = true; + break; } *************** *** 566,569 **** --- 573,577 ---- "[OpenGL jogl ]", "[OpenGL fastjogl]", + "[OpenGL lwjgl]", null }; *************** *** 659,662 **** --- 667,675 ---- s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_OPENGL_FASTJOGL; } + else if ( vid_ref.string.equalsIgnoreCase("lwjgl")) + { + s_current_menu_index = OPENGL_MENU; + s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_OPENGL_LWJGL; + } // else if (strcmp( vid_ref->string, "softx" ) == 0 ) // { Index: V.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/V.java,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.1.2.1 diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.1.2.1 *** V.java 9 Jul 2004 08:38:24 -0000 1.1.1.1.2.1 --- V.java 13 Dec 2004 21:40:45 -0000 1.1.1.1.2.1.2.1 *************** *** 29,33 **** import jake2.game.Cmd; import jake2.game.cvar_t; ! import jake2.qcommon.*; import jake2.sys.Sys; import jake2.util.Math3D; --- 29,35 ---- import jake2.game.Cmd; import jake2.game.cvar_t; ! import jake2.qcommon.Com; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.xcommand_t; import jake2.sys.Sys; import jake2.util.Math3D; *************** *** 106,110 **** int c = particle_t.colorTable[color]; c |= (int)(alpha * 255) << 24; ! particle_t.colorArray.put(i, c); i *= 3; --- 108,112 ---- int c = particle_t.colorTable[color]; c |= (int)(alpha * 255) << 24; ! particle_t.colorArray.asIntBuffer().put(i, c); i *= 3; Index: refexport_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/refexport_t.java,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.1.2.1 diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.1.2.1 *** refexport_t.java 6 Sep 2004 19:39:13 -0000 1.1.1.1.2.1 --- refexport_t.java 13 Dec 2004 21:40:45 -0000 1.1.1.1.2.1.2.1 *************** *** 30,33 **** --- 30,34 ---- import jake2.render.image_t; import jake2.render.model_t; + import jake2.sys.KBD; import java.awt.Dimension; *************** *** 108,110 **** --- 109,113 ---- DisplayMode[] getModeList(); + + KBD getKeyboardHandler(); } |