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...> - 2007-01-02 13:45:04
|
Update of /cvsroot/jake2/jake2/lib/joal In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32637/lib/joal Modified Files: joal.jar gluegen-rt.jar Log Message: update to joal release 1.1.0 Index: gluegen-rt.jar =================================================================== RCS file: /cvsroot/jake2/jake2/lib/joal/gluegen-rt.jar,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsdvRVv8 and /tmp/cvs5s0e3G differ Index: joal.jar =================================================================== RCS file: /cvsroot/jake2/jake2/lib/joal/joal.jar,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsDKS4ys and /tmp/cvsZNEHm1 differ |
From: Carsten W. <ca...@us...> - 2007-01-02 13:45:04
|
Update of /cvsroot/jake2/jake2/lib/joal/linux In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32637/lib/joal/linux Modified Files: libjoal_native.so Log Message: update to joal release 1.1.0 Index: libjoal_native.so =================================================================== RCS file: /cvsroot/jake2/jake2/lib/joal/linux/libjoal_native.so,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsVyxNu8 and /tmp/cvsy70h1G differ |
From: Carsten W. <ca...@us...> - 2007-01-02 13:42:55
|
Update of /cvsroot/jake2/jake2/test/jake2/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31788/test/jake2/render Modified Files: TestMap.java Log Message: bugfix: TestMap works now. (re.EndRegistration() doesn't work in this context) Index: TestMap.java =================================================================== RCS file: /cvsroot/jake2/jake2/test/jake2/render/TestMap.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestMap.java 21 Nov 2006 00:48:14 -0000 1.7 --- TestMap.java 2 Jan 2007 13:42:47 -0000 1.8 *************** *** 82,90 **** } ! Qcommon.Init(new String[] { "TestMap $Id$" }); // sehr wichtig !!! VID.Shutdown(); ! Globals.re = this.re = Renderer.getDriver("jsr231", false); re.Init(0, 0); --- 82,90 ---- } ! Qcommon.Init(new String[] { "TestMap" }); // sehr wichtig !!! VID.Shutdown(); ! Globals.re = this.re = Renderer.getDriver("jsr231", true); re.Init(0, 0); *************** *** 151,159 **** case 1 : // register the map ! re.BeginRegistration("base1"); re.SetSky("space1", 0, new float[]{ 0, 0, 0 }); - re.EndRegistration(); currentState = 2; - //break; default : if (framecount % 500 == 0) --- 151,157 ---- case 1 : // register the map ! re.BeginRegistration("demo1"); re.SetSky("space1", 0, new float[]{ 0, 0, 0 }); currentState = 2; default : if (framecount % 500 == 0) *************** *** 284,289 **** ent.angles = new float[] { 0, 300, 0 }; - refdef.num_entities = 1; refdef.entities = new entity_t[] {ent}; lightstyle_t light = new lightstyle_t(); --- 282,287 ---- ent.angles = new float[] { 0, 300, 0 }; refdef.entities = new entity_t[] {ent}; + refdef.num_entities = refdef.entities.length; lightstyle_t light = new lightstyle_t(); |
From: Carsten W. <ca...@us...> - 2006-12-12 15:20:34
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14072/src/jake2/sys Modified Files: IN.java Log Message: hide mouse on cinematic Index: IN.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/IN.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** IN.java 16 Dec 2004 22:45:55 -0000 1.7 --- IN.java 12 Dec 2006 15:20:30 -0000 1.8 *************** *** 159,164 **** public static void Frame() { ! if (!cl.refresh_prepped || cls.key_dest == key_console ! || cls.key_dest == key_menu) DeactivateMouse(); else --- 159,164 ---- public static void Frame() { ! if (!cl.cinematicpalette_active && (!cl.refresh_prepped || cls.key_dest == key_console ! || cls.key_dest == key_menu)) DeactivateMouse(); else |
From: Carsten W. <ca...@us...> - 2006-12-12 15:20:33
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14072/src/jake2/client Modified Files: client_state_t.java Log Message: hide mouse on cinematic Index: client_state_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/client_state_t.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** client_state_t.java 21 Nov 2005 19:38:38 -0000 1.5 --- client_state_t.java 12 Dec 2006 15:20:30 -0000 1.6 *************** *** 113,117 **** int cinematicframe; byte cinematicpalette[] = new byte[768]; ! boolean cinematicpalette_active; // --- 113,117 ---- int cinematicframe; byte cinematicpalette[] = new byte[768]; ! public boolean cinematicpalette_active; // |
From: Carsten W. <ca...@us...> - 2006-12-12 14:46:09
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fast In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32504/src/jake2/render/fast Modified Files: Main.java Log Message: add a better multitexturing check Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fast/Main.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Main.java 22 Nov 2006 15:05:39 -0000 1.4 --- Main.java 12 Dec 2006 14:46:04 -0000 1.5 *************** *** 1250,1259 **** if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n"); ! qglActiveTextureARB = true; ! TEXTURE0 = GL_TEXTURE0_ARB; ! TEXTURE1 = GL_TEXTURE1_ARB; } else { VID.Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n"); } --- 1250,1267 ---- if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) { ! // check if the extension realy exists ! try { ! gl.glClientActiveTextureARB(GL_TEXTURE0_ARB); ! // seems to work correctly ! VID.Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n"); ! qglActiveTextureARB = true; ! TEXTURE0 = GL_TEXTURE0_ARB; ! TEXTURE1 = GL_TEXTURE1_ARB; ! } catch (Exception e) { ! qglActiveTextureARB = false; ! } } else { + qglActiveTextureARB = false; VID.Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n"); } |
From: Carsten W. <ca...@us...> - 2006-12-12 13:19:12
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31258/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: format only Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Jsr231Driver.java 11 Dec 2006 22:57:56 -0000 1.23 --- Jsr231Driver.java 12 Dec 2006 13:18:44 -0000 1.24 *************** *** 221,225 **** while (!canvas.isDisplayable() || !window.isDisplayable()) { try { ! Thread.sleep(50); } catch (InterruptedException e) {} } --- 221,225 ---- while (!canvas.isDisplayable() || !window.isDisplayable()) { try { ! Thread.sleep(100); } catch (InterruptedException e) {} } *************** *** 239,276 **** public void shutdown() { ! try { ! EventQueue.invokeAndWait(new Runnable() { ! public void run() { ! if (oldDisplayMode != null ! && device.getFullScreenWindow() != null) { ! try { ! if (device.isFullScreenSupported()) { ! if (!device.getDisplayMode().equals( ! oldDisplayMode)) ! device.setDisplayMode(oldDisplayMode); } - device.setFullScreenWindow(null); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - }); - } catch (Exception e) { - e.printStackTrace(); - } - if (window != null) { - if (display != null) display.destroy(); - window.dispose(); - while (window.isDisplayable()) { - try { - Thread.sleep(50); - } catch (InterruptedException e) { - } } ! } ! display = null; } --- 239,276 ---- public void shutdown() { ! try { ! EventQueue.invokeAndWait(new Runnable() { ! public void run() { ! if (oldDisplayMode != null ! && device.getFullScreenWindow() != null) { ! try { ! if (device.isFullScreenSupported()) { ! if (!device.getDisplayMode().equals( ! oldDisplayMode)) ! device.setDisplayMode(oldDisplayMode); + } + device.setFullScreenWindow(null); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + }); + } catch (Exception e) { + e.printStackTrace(); + } + if (window != null) { + if (display != null) display.destroy(); + window.dispose(); + while (window.isDisplayable()) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { } + } } ! display = null; } *************** *** 373,377 **** public void removeNotify() { if (drawable != null) { ! drawable.setRealized(false); drawable = null; } --- 373,377 ---- public void removeNotify() { if (drawable != null) { ! drawable.setRealized(false); drawable = null; } *************** *** 393,405 **** drawable.swapBuffers(); } ! void destroy() { ! if (context != null) { ! release(); ! context.destroy(); ! context = null; ! } } ! private static GraphicsConfiguration unwrap(AWTGraphicsConfiguration config) { if (config == null) { --- 393,405 ---- drawable.swapBuffers(); } ! void destroy() { ! if (context != null) { ! release(); ! context.destroy(); ! context = null; ! } } ! private static GraphicsConfiguration unwrap(AWTGraphicsConfiguration config) { if (config == null) { |
From: Carsten W. <ca...@us...> - 2006-12-12 13:02:29
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24986/src/jake2/render Modified Files: JoglRenderer.java Log Message: simplifies the callback parameters (final values) Index: JoglRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglRenderer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JoglRenderer.java 22 Nov 2006 15:05:39 -0000 1.9 --- JoglRenderer.java 12 Dec 2006 13:02:25 -0000 1.10 *************** *** 66,70 **** private boolean post_init = false; ! /** * @see jake2.client.refexport_t#Init() */ --- 66,71 ---- private boolean post_init = false; ! ! /** * @see jake2.client.refexport_t#Init() */ *************** *** 94,194 **** * @see jake2.client.refexport_t#BeginRegistration(java.lang.String) */ ! public void BeginRegistration(String map) { if (contextInUse) { impl.R_BeginRegistration(map); ! return; } - - this.name = map; - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_BeginRegistration(JoglRenderer.this.name); - } - }); } - private model_t model = null; - private String name = null; /** * @see jake2.client.refexport_t#RegisterModel(java.lang.String) */ ! public model_t RegisterModel(String name) { ! ! if (contextInUse) return impl.R_RegisterModel(name); ! ! model = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! JoglRenderer.this.model = impl.R_RegisterModel(JoglRenderer.this.name); ! } ! }); ! return model; } /** * @see jake2.client.refexport_t#RegisterSkin(java.lang.String) */ ! public image_t RegisterSkin(String name) { ! if (contextInUse) return impl.R_RegisterSkin(name); ! ! this.image = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! JoglRenderer.this.image = impl.R_RegisterSkin(JoglRenderer.this.name); ! } ! }); ! return image; } - private image_t image = null; - /** * @see jake2.client.refexport_t#RegisterPic(java.lang.String) */ ! public image_t RegisterPic(String name) { ! if (contextInUse) return impl.Draw_FindPic(name); ! ! this.image = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! JoglRenderer.this.image = impl.Draw_FindPic(JoglRenderer.this.name); ! } ! }); ! return image; } - private float[] axis; - private float rotate; - /** * @see jake2.client.refexport_t#SetSky(java.lang.String, float, float[]) */ ! public void SetSky(String name, float rotate, float[] axis) { if (contextInUse) { impl.R_SetSky(name, rotate, axis); ! return; } - - this.name = name; - this.rotate = rotate; - this.axis = axis; - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_SetSky(JoglRenderer.this.name, JoglRenderer.this.rotate, JoglRenderer.this.axis); - } - }); } --- 95,175 ---- * @see jake2.client.refexport_t#BeginRegistration(java.lang.String) */ ! public void BeginRegistration(final String map) { if (contextInUse) { impl.R_BeginRegistration(map); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_BeginRegistration(map); ! } ! }); } } private model_t model = null; /** * @see jake2.client.refexport_t#RegisterModel(java.lang.String) */ ! public model_t RegisterModel(final String name) { ! if (contextInUse) { return impl.R_RegisterModel(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! JoglRenderer.this.model = impl.R_RegisterModel(name); ! } ! }); ! return model; ! } } + private image_t image = null; + /** * @see jake2.client.refexport_t#RegisterSkin(java.lang.String) */ ! public image_t RegisterSkin(final String name) { ! if (contextInUse) { return impl.R_RegisterSkin(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! JoglRenderer.this.image = impl.R_RegisterSkin(name); ! } ! }); ! return image; ! } } /** * @see jake2.client.refexport_t#RegisterPic(java.lang.String) */ ! public image_t RegisterPic(final String name) { ! if (contextInUse) { return impl.Draw_FindPic(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! JoglRenderer.this.image = impl.Draw_FindPic(name); ! } ! }); ! return image; ! } } /** * @see jake2.client.refexport_t#SetSky(java.lang.String, float, float[]) */ ! public void SetSky(final String name, final float rotate, final float[] axis) { if (contextInUse) { impl.R_SetSky(name, rotate, axis); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_SetSky(name, rotate, axis); ! } ! }); } } *************** *** 199,210 **** if (contextInUse) { impl.R_EndRegistration(); ! return; } - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_EndRegistration(); - } - }); } --- 180,190 ---- if (contextInUse) { impl.R_EndRegistration(); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_EndRegistration(); ! } ! }); } } *************** *** 237,260 **** } - private int x, y, num; - /** * @see jake2.client.refexport_t#DrawChar(int, int, int) */ ! public void DrawChar(int x, int y, int num) { if (contextInUse) { impl.Draw_Char(x, y, num);; ! return; } - - this.x = x; - this.y = y; - this.num = num; - - updateScreen(new xcommand_t() { - public void execute() { - impl.Draw_Char(JoglRenderer.this.x, JoglRenderer.this.y, JoglRenderer.this.num); - } - }); } --- 217,233 ---- } /** * @see jake2.client.refexport_t#DrawChar(int, int, int) */ ! public void DrawChar(final int x, final int y, final int num) { if (contextInUse) { impl.Draw_Char(x, y, num);; ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.Draw_Char(x, y, num); ! } ! }); } } *************** *** 315,319 **** } ! public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); --- 288,292 ---- } ! public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); *************** *** 325,330 **** }); } ! ! } public int apiVersion() { --- 298,302 ---- }); } ! } public int apiVersion() { |
From: Carsten W. <ca...@us...> - 2006-12-12 12:54:21
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21802/src/jake2/render Modified Files: Jsr231cbRenderer.java Log Message: simplifies the callback parameters (final values) Index: Jsr231cbRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Jsr231cbRenderer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jsr231cbRenderer.java 11 Dec 2006 12:56:30 -0000 1.1 --- Jsr231cbRenderer.java 12 Dec 2006 12:54:16 -0000 1.2 *************** *** 67,71 **** private boolean post_init = false; ! /** * @see jake2.client.refexport_t#Init() */ --- 67,72 ---- private boolean post_init = false; ! ! /** * @see jake2.client.refexport_t#Init() */ *************** *** 95,195 **** * @see jake2.client.refexport_t#BeginRegistration(java.lang.String) */ ! public void BeginRegistration(String map) { if (contextInUse) { impl.R_BeginRegistration(map); ! return; } - - this.name = map; - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_BeginRegistration(Jsr231cbRenderer.this.name); - } - }); } private model_t model = null; - private String name = null; /** * @see jake2.client.refexport_t#RegisterModel(java.lang.String) */ ! public model_t RegisterModel(String name) { ! ! if (contextInUse) return impl.R_RegisterModel(name); ! ! model = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.model = impl.R_RegisterModel(Jsr231cbRenderer.this.name); ! } ! }); ! return model; } /** * @see jake2.client.refexport_t#RegisterSkin(java.lang.String) */ ! public image_t RegisterSkin(String name) { ! if (contextInUse) return impl.R_RegisterSkin(name); ! ! this.image = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.image = impl.R_RegisterSkin(Jsr231cbRenderer.this.name); ! } ! }); ! return image; } - private image_t image = null; - /** * @see jake2.client.refexport_t#RegisterPic(java.lang.String) */ ! public image_t RegisterPic(String name) { ! if (contextInUse) return impl.Draw_FindPic(name); ! ! this.image = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.image = impl.Draw_FindPic(Jsr231cbRenderer.this.name); ! } ! }); ! return image; } - private float[] axis; - private float rotate; - /** * @see jake2.client.refexport_t#SetSky(java.lang.String, float, float[]) */ ! public void SetSky(String name, float rotate, float[] axis) { if (contextInUse) { impl.R_SetSky(name, rotate, axis); ! return; } - - this.name = name; - this.rotate = rotate; - this.axis = axis; - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_SetSky(Jsr231cbRenderer.this.name, Jsr231cbRenderer.this.rotate, Jsr231cbRenderer.this.axis); - } - }); } --- 96,177 ---- * @see jake2.client.refexport_t#BeginRegistration(java.lang.String) */ ! public void BeginRegistration(final String map) { if (contextInUse) { impl.R_BeginRegistration(map); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_BeginRegistration(map); ! } ! }); } } private model_t model = null; /** * @see jake2.client.refexport_t#RegisterModel(java.lang.String) */ ! public model_t RegisterModel(final String name) { ! if (contextInUse) { return impl.R_RegisterModel(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.model = impl.R_RegisterModel(name); ! } ! }); ! return model; ! } } + private image_t image = null; + /** * @see jake2.client.refexport_t#RegisterSkin(java.lang.String) */ ! public image_t RegisterSkin(final String name) { ! if (contextInUse) { return impl.R_RegisterSkin(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.image = impl.R_RegisterSkin(name); ! } ! }); ! return image; ! } } /** * @see jake2.client.refexport_t#RegisterPic(java.lang.String) */ ! public image_t RegisterPic(final String name) { ! if (contextInUse) { return impl.Draw_FindPic(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.image = impl.Draw_FindPic(name); ! } ! }); ! return image; ! } } /** * @see jake2.client.refexport_t#SetSky(java.lang.String, float, float[]) */ ! public void SetSky(final String name, final float rotate, final float[] axis) { if (contextInUse) { impl.R_SetSky(name, rotate, axis); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_SetSky(name, rotate, axis); ! } ! }); } } *************** *** 200,211 **** if (contextInUse) { impl.R_EndRegistration(); ! return; } - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_EndRegistration(); - } - }); } --- 182,192 ---- if (contextInUse) { impl.R_EndRegistration(); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_EndRegistration(); ! } ! }); } } *************** *** 238,261 **** } - private int x, y, num; - /** * @see jake2.client.refexport_t#DrawChar(int, int, int) */ ! public void DrawChar(int x, int y, int num) { if (contextInUse) { impl.Draw_Char(x, y, num);; ! return; } - - this.x = x; - this.y = y; - this.num = num; - - updateScreen(new xcommand_t() { - public void execute() { - impl.Draw_Char(Jsr231cbRenderer.this.x, Jsr231cbRenderer.this.y, Jsr231cbRenderer.this.num); - } - }); } --- 219,235 ---- } /** * @see jake2.client.refexport_t#DrawChar(int, int, int) */ ! public void DrawChar(final int x, final int y, final int num) { if (contextInUse) { impl.Draw_Char(x, y, num);; ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.Draw_Char(x, y, num); ! } ! }); } } *************** *** 316,320 **** } ! public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); --- 290,294 ---- } ! public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); *************** *** 326,331 **** }); } ! ! } public int apiVersion() { --- 300,304 ---- }); } ! } public int apiVersion() { |
From: Carsten W. <ca...@us...> - 2006-12-11 22:58:02
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20939/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: NPE bug Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Jsr231Driver.java 11 Dec 2006 22:51:09 -0000 1.22 --- Jsr231Driver.java 11 Dec 2006 22:57:56 -0000 1.23 *************** *** 262,268 **** } if (window != null) { ! display.destroy(); window.dispose(); ! while (window.isDisplayable() || display.isDisplayable()) { try { Thread.sleep(50); --- 262,268 ---- } if (window != null) { ! if (display != null) display.destroy(); window.dispose(); ! while (window.isDisplayable()) { try { Thread.sleep(50); |
From: Carsten W. <ca...@us...> - 2006-12-11 22:51:12
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18481/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: exit thread removed because of linux Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Jsr231Driver.java 11 Dec 2006 22:44:38 -0000 1.21 --- Jsr231Driver.java 11 Dec 2006 22:51:09 -0000 1.22 *************** *** 239,285 **** public void shutdown() { ! Thread exit = new Thread(new Runnable() { ! public void run() { - try { - EventQueue.invokeAndWait(new Runnable() { - public void run() { - if (oldDisplayMode != null - && device.getFullScreenWindow() != null) { - try { - if (device.isFullScreenSupported()) { - if (!device.getDisplayMode().equals(oldDisplayMode)) - device.setDisplayMode(oldDisplayMode); - - } - device.setFullScreenWindow(null); - } catch (Exception e) { - e.printStackTrace(); - } } } - }); - } catch (Exception e) { - e.printStackTrace(); - } - if (window != null) { - display.destroy(); - window.dispose(); - while (window.isDisplayable() || display.isDisplayable()) { - try { - Thread.sleep(50); - } catch (InterruptedException e) {} - } } } - }); - exit.start(); - try { - exit.join(); - } catch (InterruptedException e) { } display = null; - } --- 239,276 ---- public void shutdown() { ! try { ! EventQueue.invokeAndWait(new Runnable() { ! public void run() { ! if (oldDisplayMode != null ! && device.getFullScreenWindow() != null) { ! try { ! if (device.isFullScreenSupported()) { ! if (!device.getDisplayMode().equals( ! oldDisplayMode)) ! device.setDisplayMode(oldDisplayMode); } + device.setFullScreenWindow(null); + } catch (Exception e) { + e.printStackTrace(); } } } + }); + } catch (Exception e) { + e.printStackTrace(); + } + if (window != null) { + display.destroy(); + window.dispose(); + while (window.isDisplayable() || display.isDisplayable()) { + try { + Thread.sleep(50); + } catch (InterruptedException e) { + } + } } display = null; } |
From: Carsten W. <ca...@us...> - 2006-12-11 22:44:45
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15655/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: hope this helps on win32 screen mode switching Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Jsr231Driver.java 11 Dec 2006 22:16:06 -0000 1.20 --- Jsr231Driver.java 11 Dec 2006 22:44:38 -0000 1.21 *************** *** 219,223 **** } ! while (!canvas.isDisplayable()) { try { Thread.sleep(50); --- 219,223 ---- } ! while (!canvas.isDisplayable() || !window.isDisplayable()) { try { Thread.sleep(50); *************** *** 266,269 **** --- 266,275 ---- display.destroy(); window.dispose(); + while (window.isDisplayable() || display.isDisplayable()) { + try { + Thread.sleep(50); + } catch (InterruptedException e) {} + + } } } |
From: Carsten W. <ca...@us...> - 2006-12-11 22:16:10
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4472/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: hope this helps on win32 screen mode switching Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Jsr231Driver.java 11 Dec 2006 21:56:10 -0000 1.19 --- Jsr231Driver.java 11 Dec 2006 22:16:06 -0000 1.20 *************** *** 139,144 **** * fullscreen handling */ ! GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); ! device = env.getDefaultScreenDevice(); if (oldDisplayMode == null) { --- 139,146 ---- * fullscreen handling */ ! if (device == null) { ! GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); ! device = env.getDefaultScreenDevice(); ! } if (oldDisplayMode == null) { *************** *** 202,213 **** } else { - // Not much point in having a full-screen window in this - // case - device.setFullScreenWindow(null); final Frame f2 = window; try { EventQueue.invokeAndWait(new Runnable() { public void run() { - f2.setVisible(false); f2.setLocation(window_xpos, window_ypos); f2.pack(); --- 204,211 ---- *************** *** 250,255 **** && device.getFullScreenWindow() != null) { try { ! if (device.isFullScreenSupported()) ! device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); } catch (Exception e) { --- 248,256 ---- && device.getFullScreenWindow() != null) { try { ! if (device.isFullScreenSupported()) { ! if (!device.getDisplayMode().equals(oldDisplayMode)) ! device.setDisplayMode(oldDisplayMode); ! ! } device.setFullScreenWindow(null); } catch (Exception e) { |
From: Carsten W. <ca...@us...> - 2006-12-11 21:56:14
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv28921/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: hope this helps on win32 screen mode switching Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Jsr231Driver.java 11 Dec 2006 21:32:17 -0000 1.18 --- Jsr231Driver.java 11 Dec 2006 21:56:10 -0000 1.19 *************** *** 52,56 **** private GraphicsDevice device; private DisplayMode oldDisplayMode; ! private Display display; private volatile Frame window; --- 52,56 ---- private GraphicsDevice device; private DisplayMode oldDisplayMode; ! private volatile Display display; private volatile Frame window; *************** *** 154,158 **** // destroy the existing window ! shutdown(); window = new Frame("Jake2 (jsr231)"); --- 154,158 ---- // destroy the existing window ! if (window != null) shutdown(); window = new Frame("Jake2 (jsr231)"); *************** *** 241,266 **** public void shutdown() { ! try { ! EventQueue.invokeAndWait(new Runnable() { ! public void run() { ! if (oldDisplayMode != null ! && device.getFullScreenWindow() != null) { ! try { ! if (device.isFullScreenSupported()) ! device.setDisplayMode(oldDisplayMode); ! device.setFullScreenWindow(null); ! } catch (Exception e) { ! e.printStackTrace(); } ! } } ! }); ! } catch (Exception e) { ! e.printStackTrace(); ! } ! if (window != null) { ! display.destroy(); ! window.dispose(); } } --- 241,278 ---- public void shutdown() { ! Thread exit = new Thread(new Runnable() { ! public void run() { ! ! try { ! EventQueue.invokeAndWait(new Runnable() { ! public void run() { ! if (oldDisplayMode != null ! && device.getFullScreenWindow() != null) { ! try { ! if (device.isFullScreenSupported()) ! device.setDisplayMode(oldDisplayMode); ! device.setFullScreenWindow(null); ! } catch (Exception e) { ! e.printStackTrace(); ! } ! } } ! }); ! } catch (Exception e) { ! e.printStackTrace(); } ! if (window != null) { ! display.destroy(); ! window.dispose(); ! } ! } ! }); ! exit.start(); ! try { ! exit.join(); ! } catch (InterruptedException e) { } + display = null; + } |
From: Carsten W. <ca...@us...> - 2006-12-11 21:32:20
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19041/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: hope this helps on win32 screen mode switching Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Jsr231Driver.java 11 Dec 2006 16:38:09 -0000 1.17 --- Jsr231Driver.java 11 Dec 2006 21:32:17 -0000 1.18 *************** *** 1,7 **** /* ! * JoglCommon.java * Copyright (C) 2004 * - * $Id$ */ /* --- 1,6 ---- /* ! * Jsr231Driver.java * Copyright (C) 2004 * */ /* *************** *** 131,135 **** public int setMode(Dimension dim, int mode, boolean fullscreen) { ! Dimension newDim = new Dimension(); VID.Printf(Defines.PRINT_ALL, "Initializing OpenGL display\n"); --- 130,134 ---- public int setMode(Dimension dim, int mode, boolean fullscreen) { ! final Dimension newDim = new Dimension(); VID.Printf(Defines.PRINT_ALL, "Initializing OpenGL display\n"); *************** *** 183,210 **** if (fullscreen) { - - DisplayMode displayMode = findDisplayMode(newDim); - - newDim.width = displayMode.getWidth(); - newDim.height = displayMode.getHeight(); - window.setUndecorated(true); - window.setResizable(false); - - device.setFullScreenWindow(window); - - if (device.isFullScreenSupported()) - device.setDisplayMode(displayMode); - - window.setLocation(0, 0); - window.setSize(displayMode.getWidth(), displayMode.getHeight()); - canvas.setSize(displayMode.getWidth(), displayMode.getHeight()); ! VID.Printf(Defines.PRINT_ALL, "...setting fullscreen " + getModeString(displayMode) + '\n'); } else { ! window.setLocation(window_xpos, window_ypos); ! window.pack(); ! window.setResizable(false); ! window.setVisible(true); } --- 182,222 ---- if (fullscreen) { ! DisplayMode displayMode = findDisplayMode(newDim); ! ! newDim.width = displayMode.getWidth(); ! newDim.height = displayMode.getHeight(); ! window.setUndecorated(true); ! window.setResizable(false); ! ! device.setFullScreenWindow(window); ! ! if (device.isFullScreenSupported()) ! device.setDisplayMode(displayMode); ! ! window.setLocation(0, 0); ! window.setSize(displayMode.getWidth(), displayMode.getHeight()); ! canvas.setSize(displayMode.getWidth(), displayMode.getHeight()); ! ! VID.Printf(Defines.PRINT_ALL, "...setting fullscreen " + getModeString(displayMode) + '\n'); } else { ! // Not much point in having a full-screen window in this ! // case ! device.setFullScreenWindow(null); ! final Frame f2 = window; ! try { ! EventQueue.invokeAndWait(new Runnable() { ! public void run() { ! f2.setVisible(false); ! f2.setLocation(window_xpos, window_ypos); ! f2.pack(); ! f2.setResizable(false); ! f2.setVisible(true); ! } ! }); ! } catch (Exception e) { ! e.printStackTrace(); ! } } *************** *** 248,251 **** --- 260,264 ---- } if (window != null) { + display.destroy(); window.dispose(); } *************** *** 349,355 **** public void removeNotify() { ! release(); ! context.destroy(); ! drawable.setRealized(false); super.removeNotify(); } --- 362,369 ---- public void removeNotify() { ! if (drawable != null) { ! drawable.setRealized(false); ! drawable = null; ! } super.removeNotify(); } *************** *** 369,372 **** --- 383,394 ---- drawable.swapBuffers(); } + + void destroy() { + if (context != null) { + release(); + context.destroy(); + context = null; + } + } private static GraphicsConfiguration unwrap(AWTGraphicsConfiguration config) { |
From: Carsten W. <ca...@us...> - 2006-12-11 16:38:16
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv29304/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: destroy gl context in the canvas removeNotify Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Jsr231Driver.java 11 Dec 2006 15:54:41 -0000 1.16 --- Jsr231Driver.java 11 Dec 2006 16:38:09 -0000 1.17 *************** *** 54,58 **** private DisplayMode oldDisplayMode; private Display display; ! Frame window; // window position on the screen --- 54,58 ---- private DisplayMode oldDisplayMode; private Display display; ! private volatile Frame window; // window position on the screen *************** *** 248,252 **** } if (window != null) { - display.destroy(); window.dispose(); } --- 248,251 ---- *************** *** 350,353 **** --- 349,354 ---- public void removeNotify() { + release(); + context.destroy(); drawable.setRealized(false); super.removeNotify(); *************** *** 369,378 **** } - void destroy() { - release(); - context.destroy(); - drawable.setRealized(false); - } - private static GraphicsConfiguration unwrap(AWTGraphicsConfiguration config) { if (config == null) { --- 370,373 ---- |
From: Carsten W. <ca...@us...> - 2006-12-11 15:54:47
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11967/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: destroy window in the main thread Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Jsr231Driver.java 11 Dec 2006 15:43:44 -0000 1.15 --- Jsr231Driver.java 11 Dec 2006 15:54:41 -0000 1.16 *************** *** 242,249 **** } } - if (window != null) { - display.destroy(); - window.dispose(); - } } }); --- 242,245 ---- *************** *** 251,254 **** --- 247,254 ---- e.printStackTrace(); } + if (window != null) { + display.destroy(); + window.dispose(); + } } |
From: Carsten W. <ca...@us...> - 2006-12-11 15:44:39
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7953/src/jake2/render Modified Files: Renderer.java Log Message: use the default jsr231 renderer (testing) Index: Renderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Renderer.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Renderer.java 11 Dec 2006 13:10:28 -0000 1.10 --- Renderer.java 11 Dec 2006 15:44:29 -0000 1.11 *************** *** 60,64 **** // TODO this is a hack for Win32 if (System.getProperty("os.name").startsWith("Windows")) { ! Class.forName("jake2.render.Jsr231cbRenderer"); } else { Class.forName("jake2.render.Jsr231Renderer"); --- 60,64 ---- // TODO this is a hack for Win32 if (System.getProperty("os.name").startsWith("Windows")) { ! Class.forName("jake2.render.Jsr231Renderer"); } else { Class.forName("jake2.render.Jsr231Renderer"); |
From: Carsten W. <ca...@us...> - 2006-12-11 15:43:56
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7542/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: destroy window in the awt event dispatcher thread Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Jsr231Driver.java 7 Dec 2006 22:31:10 -0000 1.14 --- Jsr231Driver.java 11 Dec 2006 15:43:44 -0000 1.15 *************** *** 229,250 **** public void shutdown() { ! if (oldDisplayMode != null && device.getFullScreenWindow() != null) { ! try { if (device.isFullScreenSupported()) ! device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); ! } catch (Exception e) { e.printStackTrace(); } ! } ! if (window != null) { ! display.destroy(); ! window.dispose(); ! } } /** ! * @return true ! */ public boolean init(int xpos, int ypos) { // set window position --- 229,259 ---- public void shutdown() { ! try { ! EventQueue.invokeAndWait(new Runnable() { ! public void run() { ! if (oldDisplayMode != null ! && device.getFullScreenWindow() != null) { ! try { if (device.isFullScreenSupported()) ! device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); ! } catch (Exception e) { e.printStackTrace(); + } } ! if (window != null) { ! display.destroy(); ! window.dispose(); ! } ! } ! }); ! } catch (Exception e) { ! e.printStackTrace(); ! } } /** ! * @return true ! */ public boolean init(int xpos, int ypos) { // set window position |
From: Carsten W. <ca...@us...> - 2006-12-11 13:10:34
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10143/src/jake2/render Modified Files: Renderer.java Log Message: use the callback version of Jsr231Renderer only for Win32 Index: Renderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Renderer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Renderer.java 11 Dec 2006 12:56:30 -0000 1.9 --- Renderer.java 11 Dec 2006 13:10:28 -0000 1.10 *************** *** 58,62 **** try { Class.forName("javax.media.opengl.GL"); ! Class.forName("jake2.render.Jsr231cbRenderer"); } catch (ClassNotFoundException e) { // ignore the jogl drivers if runtime not in classpath --- 58,67 ---- try { Class.forName("javax.media.opengl.GL"); ! // TODO this is a hack for Win32 ! if (System.getProperty("os.name").startsWith("Windows")) { ! Class.forName("jake2.render.Jsr231cbRenderer"); ! } else { ! Class.forName("jake2.render.Jsr231Renderer"); ! } } catch (ClassNotFoundException e) { // ignore the jogl drivers if runtime not in classpath |
From: Carsten W. <ca...@us...> - 2006-12-11 13:00:41
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7917/src/jake2/render/opengl Modified Files: Jsr231cbDriver.java Log Message: typo Index: Jsr231cbDriver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231cbDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jsr231cbDriver.java 11 Dec 2006 12:56:30 -0000 1.1 --- Jsr231cbDriver.java 11 Dec 2006 13:00:37 -0000 1.2 *************** *** 182,186 **** shutdown(); ! window = new JFrame("Jake2 (jogl)"); ImageIcon icon = new ImageIcon(getClass().getResource("/icon-small.png")); window.setIconImage(icon.getImage()); --- 182,186 ---- shutdown(); ! window = new JFrame("Jake2 (jsr231cb)"); ImageIcon icon = new ImageIcon(getClass().getResource("/icon-small.png")); window.setIconImage(icon.getImage()); |
From: Carsten W. <ca...@us...> - 2006-12-11 12:56:55
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6268/src/jake2/render/opengl Added Files: Jsr231cbDriver.java Log Message: add a new renderer which uses the jsr231 callback interface (GLEventListener) --- NEW FILE: Jsr231cbDriver.java --- /* * Jsr231cb.java * Copyright (C) 2004 * */ /* Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package jake2.render.opengl; import jake2.Defines; import jake2.client.VID; import jake2.qcommon.Cbuf; import jake2.qcommon.xcommand_t; import jake2.render.Base; import jake2.sys.JOGLKBD; import java.awt.*; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.LinkedList; import javax.media.opengl.*; import javax.swing.ImageIcon; import javax.swing.JFrame; /** * JoglCommon */ public abstract class Jsr231cbDriver extends Jsr231GL implements GLDriver, GLEventListener { protected Jsr231cbDriver() { // see JoglRenderer } private GraphicsDevice device; private DisplayMode oldDisplayMode; private GLCanvas canvas; JFrame window; // window position on the screen int window_xpos, window_ypos; // handles the post initialization with JoglRenderer protected boolean post_init = false; protected boolean contextInUse = false; protected final xcommand_t INIT_CALLBACK = new xcommand_t() { public void execute() { // only used for the first run (initialization) // clear the screen glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // // check the post init process // if (!post_init) { VID.Printf(Defines.PRINT_ALL, "Missing multi-texturing for FastJOGL renderer\n"); } endFrame(); } }; xcommand_t callback = INIT_CALLBACK; public DisplayMode[] getModeList() { DisplayMode[] modes = device.getDisplayModes(); LinkedList l = new LinkedList(); l.add(oldDisplayMode); for (int i = 0; i < modes.length; i++) { DisplayMode m = modes[i]; if (m.getBitDepth() != oldDisplayMode.getBitDepth()) continue; if (m.getRefreshRate() > oldDisplayMode.getRefreshRate()) continue; if (m.getHeight() < 240 || m.getWidth() < 320) continue; int j = 0; DisplayMode ml = null; for (j = 0; j < l.size(); j++) { ml = (DisplayMode)l.get(j); if (ml.getWidth() > m.getWidth()) break; if (ml.getWidth() == m.getWidth() && ml.getHeight() >= m.getHeight()) break; } if (j == l.size()) { l.addLast(m); } else if (ml.getWidth() > m.getWidth() || ml.getHeight() > m.getHeight()) { l.add(j, m); } else if (m.getRefreshRate() > ml.getRefreshRate()){ l.remove(j); l.add(j, m); } } DisplayMode[] ma = new DisplayMode[l.size()]; l.toArray(ma); return ma; } DisplayMode findDisplayMode(Dimension dim) { DisplayMode mode = null; DisplayMode m = null; DisplayMode[] modes = getModeList(); int w = dim.width; int h = dim.height; for (int i = 0; i < modes.length; i++) { m = modes[i]; if (m.getWidth() == w && m.getHeight() == h) { mode = m; break; } } if (mode == null) mode = oldDisplayMode; return mode; } String getModeString(DisplayMode m) { StringBuffer sb = new StringBuffer(); sb.append(m.getWidth()); sb.append('x'); sb.append(m.getHeight()); sb.append('x'); sb.append(m.getBitDepth()); sb.append('@'); sb.append(m.getRefreshRate()); sb.append("Hz"); return sb.toString(); } /** * @param dim * @param mode * @param fullscreen * @return enum Base.rserr_t */ public int setMode(Dimension dim, int mode, boolean fullscreen) { Dimension newDim = new Dimension(); VID.Printf(Defines.PRINT_ALL, "Initializing OpenGL display\n"); VID.Printf(Defines.PRINT_ALL, "...setting mode " + mode + ":"); /* * fullscreen handling */ GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); device = env.getDefaultScreenDevice(); if (oldDisplayMode == null) { oldDisplayMode = device.getDisplayMode(); } if (!VID.GetModeInfo(newDim, mode)) { VID.Printf(Defines.PRINT_ALL, " invalid mode\n"); return Base.rserr_invalid_mode; } VID.Printf(Defines.PRINT_ALL, " " + newDim.width + " " + newDim.height + '\n'); // destroy the existing window shutdown(); window = new JFrame("Jake2 (jogl)"); ImageIcon icon = new ImageIcon(getClass().getResource("/icon-small.png")); window.setIconImage(icon.getImage()); GLCanvas canvas = new GLCanvas(new GLCapabilities()); // we want keypressed events for TAB key canvas.setFocusTraversalKeysEnabled(false); // TODO Use debug pipeline //canvas.setGL(new DebugGL(canvas.getGL())); canvas.setAutoSwapBufferMode(false); canvas.setAutoSwapBufferMode(false); canvas.addGLEventListener(this); window.getContentPane().add(canvas); canvas.setSize(newDim.width, newDim.height); // register event listener window.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { Cbuf.ExecuteText(Defines.EXEC_APPEND, "quit"); } }); // D I F F E R E N T J A K E 2 E V E N T P R O C E S S I N G window.addComponentListener(JOGLKBD.listener); canvas.addKeyListener(JOGLKBD.listener); canvas.addMouseListener(JOGLKBD.listener); canvas.addMouseMotionListener(JOGLKBD.listener); canvas.addMouseWheelListener(JOGLKBD.listener); if (fullscreen) { DisplayMode displayMode = findDisplayMode(newDim); newDim.width = displayMode.getWidth(); newDim.height = displayMode.getHeight(); window.setUndecorated(true); window.setResizable(false); device.setFullScreenWindow(window); if (device.isFullScreenSupported()) device.setDisplayMode(displayMode); window.setLocation(0, 0); window.setSize(displayMode.getWidth(), displayMode.getHeight()); canvas.setSize(displayMode.getWidth(), displayMode.getHeight()); VID.Printf(Defines.PRINT_ALL, "...setting fullscreen " + getModeString(displayMode) + '\n'); } else { window.setLocation(window_xpos, window_ypos); window.pack(); window.setResizable(false); window.setVisible(true); } while (!canvas.isDisplayable()) { try { Thread.sleep(50); } catch (InterruptedException e) {} } canvas.requestFocus(); this.canvas = canvas; Base.setVid(newDim.width, newDim.height); // let the sound and input subsystems know about the new window VID.NewWindow(newDim.width, newDim.height); return Base.rserr_ok; } public void shutdown() { if (oldDisplayMode != null && device.getFullScreenWindow() != null) { try { if (device.isFullScreenSupported()) device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); } catch (Exception e) { e.printStackTrace(); } } if (window != null) { // this is very important to change the GL context if (canvas != null) { canvas.setVisible(false); window.remove(canvas); canvas = null; } window.dispose(); } post_init = false; callback = INIT_CALLBACK; } /** * @return true */ public boolean init(int xpos, int ypos) { // do nothing window_xpos = xpos; window_ypos = ypos; return true; } public void beginFrame(float camera_separation) { // do nothing } public void endFrame() { glFlush(); canvas.swapBuffers(); } public void appActivate(boolean activate) { // do nothing } public void enableLogging(boolean enable) { // do nothing } public void logNewFrame() { // do nothing } /* * @see jake2.client.refexport_t#updateScreen() */ public void updateScreen() { this.callback = INIT_CALLBACK; canvas.display(); } public void updateScreen(xcommand_t callback) { this.callback = callback; canvas.display(); } // ============================================================================ // GLEventListener interface // ============================================================================ /* * @see net.java.games.jogl.GLEventListener#init(net.java.games.jogl.GLDrawable) */ public void init(GLAutoDrawable drawable) { setGL(drawable.getGL()); } /* * @see net.java.games.jogl.GLEventListener#display(net.java.games.jogl.GLDrawable) */ public void display(GLAutoDrawable drawable) { setGL(drawable.getGL()); contextInUse = true; callback.execute(); contextInUse = false; } /* * @see net.java.games.jogl.GLEventListener#displayChanged(net.java.games.jogl.GLDrawable, boolean, boolean) */ public void displayChanged(GLAutoDrawable drawable, boolean arg1, boolean arg2) { // do nothing } /* * @see net.java.games.jogl.GLEventListener#reshape(net.java.games.jogl.GLDrawable, int, int, int, int) */ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { // do nothing } } |
From: Carsten W. <ca...@us...> - 2006-12-11 12:56:55
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6268/src/jake2/render Modified Files: Renderer.java Added Files: Jsr231cbRenderer.java Log Message: add a new renderer which uses the jsr231 callback interface (GLEventListener) --- NEW FILE: Jsr231cbRenderer.java --- /* * Jsr231cbRenderer.java * Copyright (C) 2003 * */ /* Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package jake2.render; import jake2.Defines; import jake2.client.refdef_t; import jake2.client.refexport_t; import jake2.qcommon.xcommand_t; import jake2.render.opengl.Jsr231cbDriver; import jake2.sys.JOGLKBD; import jake2.sys.KBD; import java.awt.Dimension; /** * Jsr231cbRenderer * * This is render uses the callback version of jsr231 * * @author cwei */ final class Jsr231cbRenderer extends Jsr231cbDriver implements refexport_t, Ref { public static final String DRIVER_NAME = "jsr231"; private KBD kbd = new JOGLKBD(); // is set from Renderer factory private RenderAPI impl; static { Renderer.register(new Jsr231cbRenderer()); }; private Jsr231cbRenderer() { // singleton } // ============================================================================ // public interface for Renderer implementations // // refexport_t (ref.h) // ============================================================================ private boolean post_init = false; /** * @see jake2.client.refexport_t#Init() */ public boolean Init(int vid_xpos, int vid_ypos) { // init the OpenGL drivers impl.setGLDriver(this); // pre init if (!impl.R_Init(vid_xpos, vid_ypos)) return false; // calls the R_Init2() internally updateScreen(new xcommand_t() { public void execute() { Jsr231cbRenderer.this.post_init = impl.R_Init2(); } }); // the result from R_Init2() return post_init; } /** * @see jake2.client.refexport_t#Shutdown() */ public void Shutdown() { impl.R_Shutdown(); } /** * @see jake2.client.refexport_t#BeginRegistration(java.lang.String) */ public void BeginRegistration(String map) { if (contextInUse) { impl.R_BeginRegistration(map); return; } this.name = map; updateScreen(new xcommand_t() { public void execute() { impl.R_BeginRegistration(Jsr231cbRenderer.this.name); } }); } private model_t model = null; private String name = null; /** * @see jake2.client.refexport_t#RegisterModel(java.lang.String) */ public model_t RegisterModel(String name) { if (contextInUse) return impl.R_RegisterModel(name); model = null; this.name = name; updateScreen(new xcommand_t() { public void execute() { Jsr231cbRenderer.this.model = impl.R_RegisterModel(Jsr231cbRenderer.this.name); } }); return model; } /** * @see jake2.client.refexport_t#RegisterSkin(java.lang.String) */ public image_t RegisterSkin(String name) { if (contextInUse) return impl.R_RegisterSkin(name); this.image = null; this.name = name; updateScreen(new xcommand_t() { public void execute() { Jsr231cbRenderer.this.image = impl.R_RegisterSkin(Jsr231cbRenderer.this.name); } }); return image; } private image_t image = null; /** * @see jake2.client.refexport_t#RegisterPic(java.lang.String) */ public image_t RegisterPic(String name) { if (contextInUse) return impl.Draw_FindPic(name); this.image = null; this.name = name; updateScreen(new xcommand_t() { public void execute() { Jsr231cbRenderer.this.image = impl.Draw_FindPic(Jsr231cbRenderer.this.name); } }); return image; } private float[] axis; private float rotate; /** * @see jake2.client.refexport_t#SetSky(java.lang.String, float, float[]) */ public void SetSky(String name, float rotate, float[] axis) { if (contextInUse) { impl.R_SetSky(name, rotate, axis); return; } this.name = name; this.rotate = rotate; this.axis = axis; updateScreen(new xcommand_t() { public void execute() { impl.R_SetSky(Jsr231cbRenderer.this.name, Jsr231cbRenderer.this.rotate, Jsr231cbRenderer.this.axis); } }); } /** * @see jake2.client.refexport_t#EndRegistration() */ public void EndRegistration() { if (contextInUse) { impl.R_EndRegistration(); return; } updateScreen(new xcommand_t() { public void execute() { impl.R_EndRegistration(); } }); } /** * @see jake2.client.refexport_t#RenderFrame(jake2.client.refdef_t) */ public void RenderFrame(refdef_t fd) { impl.R_RenderFrame(fd); } /** * @see jake2.client.refexport_t#DrawGetPicSize(java.awt.Dimension, java.lang.String) */ public void DrawGetPicSize(Dimension dim, String name) { impl.Draw_GetPicSize(dim, name); } /** * @see jake2.client.refexport_t#DrawPic(int, int, java.lang.String) */ public void DrawPic(int x, int y, String name) { impl.Draw_Pic(x, y, name); } /** * @see jake2.client.refexport_t#DrawStretchPic(int, int, int, int, java.lang.String) */ public void DrawStretchPic(int x, int y, int w, int h, String name) { impl.Draw_StretchPic(x, y, w, h, name); } private int x, y, num; /** * @see jake2.client.refexport_t#DrawChar(int, int, int) */ public void DrawChar(int x, int y, int num) { if (contextInUse) { impl.Draw_Char(x, y, num);; return; } this.x = x; this.y = y; this.num = num; updateScreen(new xcommand_t() { public void execute() { impl.Draw_Char(Jsr231cbRenderer.this.x, Jsr231cbRenderer.this.y, Jsr231cbRenderer.this.num); } }); } /** * @see jake2.client.refexport_t#DrawTileClear(int, int, int, int, java.lang.String) */ public void DrawTileClear(int x, int y, int w, int h, String name) { impl.Draw_TileClear(x, y, w, h, name); } /** * @see jake2.client.refexport_t#DrawFill(int, int, int, int, int) */ public void DrawFill(int x, int y, int w, int h, int c) { impl.Draw_Fill(x, y, w, h, c); } /** * @see jake2.client.refexport_t#DrawFadeScreen() */ public void DrawFadeScreen() { impl.Draw_FadeScreen(); } /** * @see jake2.client.refexport_t#DrawStretchRaw(int, int, int, int, int, int, byte[]) */ public void DrawStretchRaw(int x, int y, int w, int h, int cols, int rows, byte[] data) { impl.Draw_StretchRaw(x, y, w, h, cols, rows, data); } /** * @see jake2.client.refexport_t#CinematicSetPalette(byte[]) */ public void CinematicSetPalette(byte[] palette) { impl.R_SetPalette(palette); } /** * @see jake2.client.refexport_t#BeginFrame(float) */ public void BeginFrame(float camera_separation) { impl.R_BeginFrame(camera_separation); } /** * @see jake2.client.refexport_t#EndFrame() */ public void EndFrame() { endFrame(); } /** * @see jake2.client.refexport_t#AppActivate(boolean) */ public void AppActivate(boolean activate) { appActivate(activate); } public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); } else { updateScreen(new xcommand_t() { public void execute() { impl.GL_ScreenShot_f(); } }); } } public int apiVersion() { return Defines.API_VERSION; } public KBD getKeyboardHandler() { return kbd; } // ============================================================================ // Ref interface // ============================================================================ public String getName() { return DRIVER_NAME; } public String toString() { return DRIVER_NAME; } public refexport_t GetRefAPI(RenderAPI renderer) { this.impl = renderer; return this; } } Index: Renderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Renderer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Renderer.java 21 Nov 2006 01:22:00 -0000 1.8 --- Renderer.java 11 Dec 2006 12:56:30 -0000 1.9 *************** *** 58,62 **** try { Class.forName("javax.media.opengl.GL"); ! Class.forName("jake2.render.Jsr231Renderer"); } catch (ClassNotFoundException e) { // ignore the jogl drivers if runtime not in classpath --- 58,62 ---- try { Class.forName("javax.media.opengl.GL"); ! Class.forName("jake2.render.Jsr231cbRenderer"); } catch (ClassNotFoundException e) { // ignore the jogl drivers if runtime not in classpath |
From: Carsten W. <ca...@us...> - 2006-12-08 18:13:48
|
Update of /cvsroot/jake2/jake2/src/jake2/sound/joal In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6648/src/jake2/sound/joal Modified Files: JOALSoundImpl.java Removed Files: ALut.java Log Message: this is a hack for linux open the OpenAL device only once and never close at runtime of the whole game Index: JOALSoundImpl.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/joal/JOALSoundImpl.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** JOALSoundImpl.java 8 Dec 2006 17:46:20 -0000 1.22 --- JOALSoundImpl.java 8 Dec 2006 18:13:45 -0000 1.23 *************** *** 19,22 **** --- 19,23 ---- import net.java.games.joal.eax.EAX; import net.java.games.joal.eax.EAXFactory; + import net.java.games.joal.util.ALut; /** *************** *** 36,42 **** --- 37,46 ---- private int[] buffers = new int[MAX_SFX + STREAM_QUEUE]; + + private boolean initialized; private JOALSoundImpl() { // singleton + this.initialized = false; } *************** *** 47,51 **** try { ! ALut.alutInit(); al = ALFactory.getAL(); alc = ALFactory.getALC(); --- 51,59 ---- try { ! // TODO this a linux hack ! if (!initialized) { ! ALut.alutInit(); ! initialized = true; ! } al = ALFactory.getAL(); alc = ALFactory.getALC(); *************** *** 152,156 **** Channel.shutdown(); al.alDeleteBuffers(buffers.length, buffers, 0); ! ALut.alutExit(); Cmd.RemoveCommand("play"); --- 160,165 ---- Channel.shutdown(); al.alDeleteBuffers(buffers.length, buffers, 0); ! // TODO this is a linux hack ! // ALut.alutExit(); Cmd.RemoveCommand("play"); --- ALut.java DELETED --- |
From: Carsten W. <ca...@us...> - 2006-12-08 17:46:27
|
Update of /cvsroot/jake2/jake2/src/jake2/sound/joal In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27265/src/jake2/sound/joal Modified Files: JOALSoundImpl.java Added Files: ALut.java Log Message: add the ALut class from joal only for the current webstart version moved to jake2.sound.joal package Index: JOALSoundImpl.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/joal/JOALSoundImpl.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** JOALSoundImpl.java 7 Dec 2006 22:45:08 -0000 1.21 --- JOALSoundImpl.java 8 Dec 2006 17:46:20 -0000 1.22 *************** *** 19,23 **** import net.java.games.joal.eax.EAX; import net.java.games.joal.eax.EAXFactory; - import net.java.games.joal.util.ALut; /** --- 19,22 ---- --- NEW FILE: ALut.java --- package jake2.sound.joal; import net.java.games.joal.*; /** * @author Athomas Goldberg * */ public final class ALut { private static ALC alc; private static ALCdevice device; private static ALCcontext context; private static Thread initializingThread; private ALut() { } /** Initializes the OpenAL Utility Toolkit, creates an OpenAL context and makes it current on the current thread. The ALut may only be initialized on one thread at any given time. */ public static synchronized void alutInit() throws ALException { if (context != null) { throw new ALException("Already initialized on thread " + initializingThread.getName()); } if (alc == null) { alc = ALFactory.getALC(); } String deviceName = null; ALCdevice d = alc.alcOpenDevice(deviceName); if (d == null) { throw new ALException("Error opening default OpenAL device"); } ALCcontext c = alc.alcCreateContext(d, null); if (c == null) { alc.alcCloseDevice(d); throw new ALException("Error creating OpenAL context"); } alc.alcMakeContextCurrent(c); if (alc.alcGetError(d) != 0) { alc.alcDestroyContext(c); alc.alcCloseDevice(d); throw new ALException("Error making OpenAL context current"); } // Fully initialized; finish setup device = d; context = c; initializingThread = Thread.currentThread(); } /** Shuts down the OpenAL Utility Toolkit; releases and destroys the internal OpenAL context and closes the output device. Must be called from the same thread as alutInit(). Most applications should not need to call this; only those which wish to toggle sound on / off at run time by initializing and un-initializing OpenAL need to call it. */ public static synchronized void alutExit() throws ALException { if (context == null) { throw new ALException("Not initialized"); } alc.alcMakeContextCurrent(null); alc.alcDestroyContext(context); alc.alcCloseDevice(device); context = null; device = null; initializingThread = null; } } |