You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(1) |
2
(4) |
3
|
4
|
5
|
|
6
|
7
(2) |
8
(3) |
9
(5) |
10
|
11
(4) |
12
|
|
13
(2) |
14
(2) |
15
(2) |
16
(9) |
17
|
18
|
19
|
|
20
|
21
(7) |
22
(4) |
23
(4) |
24
|
25
(10) |
26
|
|
27
(4) |
28
(16) |
29
(14) |
30
(11) |
31
(1) |
|
|
|
From: Elias N. <eli...@us...> - 2005-03-31 09:32:14
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10691/src/java/org/lwjgl/opengl Modified Files: LinuxDisplayPeerInfo.java Log Message: Linux: Fix crash on exit on NVIDIA Index: LinuxDisplayPeerInfo.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplayPeerInfo.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- LinuxDisplayPeerInfo.java 29 Mar 2005 11:31:22 -0000 1.4 +++ LinuxDisplayPeerInfo.java 31 Mar 2005 09:32:04 -0000 1.5 @@ -83,8 +83,8 @@ public void destroy() { super.destroy(); LinuxDisplay.lockAWT(); - GLContext.unloadOpenGLLibrary(); LinuxDisplay.decDisplay(); + GLContext.unloadOpenGLLibrary(); LinuxDisplay.unlockAWT(); } } |
|
From: Brian M. <ma...@us...> - 2005-03-30 20:02:47
|
Update of /cvsroot/java-game-lib/LWJGL/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7345 Modified Files: download.php index.php Log Message: 0.96 specific files Index: download.php =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/www/download.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- download.php 25 Jan 2005 22:06:45 -0000 1.10 +++ download.php 30 Mar 2005 20:02:02 -0000 1.11 @@ -2,8 +2,8 @@ <h1>Download</h1> <p> - Latest stable release is 0.95. Please download it here:<br/> - <a href="https://sourceforge.net/project/showfiles.php?group_id=58488" target="_blank">LWJGL 0.95 alpha</a> + Latest stable release is 0.96. Please download it here:<br/> + <a href="https://sourceforge.net/project/showfiles.php?group_id=58488" target="_blank">LWJGL 0.96 alpha</a> </p> <p> Latest CVS tarball. Please download it here:<br/> Index: index.php =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/www/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- index.php 11 Feb 2005 16:28:48 -0000 1.8 +++ index.php 30 Mar 2005 20:02:03 -0000 1.9 @@ -8,6 +8,10 @@ <h1>News</h1> <p style="border-bottom: 1px solid #cccccc;"> + <b>Finally at last! 0.96 released!</b> <span class="newsdate">Wednesday, March 30th, 2005</span><br/> + This relase includes (among other things) AWT support and expanded DevIL and FMOD support. Please check <a href="http://lwjgl.org/forum/viewtopic.php?p=7121">this thread</a> for more info regarding the release<br/><br/> +</p> +<p style="border-bottom: 1px solid #cccccc;"> <b>LWJGL 0.95 released!</b> <span class="newsdate">Tuesday, January 25th, 2005</span><br/> 0.95 released. Lots of fixes. Thanks everybody. Please check <a href="http://lwjgl.org/forum/viewtopic.php?p=6422">this thread</a> for more info regarding the release<br/><br/> </p> @@ -19,8 +23,4 @@ <b>New site!</b> <span class="newsdate">Wednesday, November 10th, 2004</span><br/> With the help of <a href="http://www.gomjabbar.de/" target="_blank">Daniel Leinich</a> we have a new site online! If you find any bugs, please send an email to <a href="mailto:in...@lw...">in...@lw...</a><br/><br/> </p> -<p style="border-bottom: 1px solid #cccccc;"> - <b>LWJGL 0.93 released!</b> <span class="newsdate">Wednesday, October 27th, 2004</span><br/> - Thats right - <a href="download.php">another release</a> fresh off the build machine. For more info about the release, please visit <a href="http://puppygames.net/forums/viewtopic.php?p=5405" target="_blank">this thread</a> on the boards.<br/><br/> -</p> <? require('_include/footer.php'); ?> |
|
From: Brian M. <ma...@us...> - 2005-03-30 19:47:24
|
Update of /cvsroot/java-game-lib/LWJGL/www/changelogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30590/changelogs Modified Files: full-changelog.txt Added Files: 0.96-changelog.txt Log Message: 0.96 specific files --- NEW FILE: 0.96-changelog.txt --- 2005-03-30 19:51 matzon * build.xml: dont include generator in javadoc 2005-03-30 19:44 matzon * doc/README: removed reference to lwjgl_media, extracted into dir instead 2005-03-30 19:40 matzon * doc/README: added some words about fmod 2005-03-30 19:38 matzon * doc/README: updated readme to new distribution layout 2005-03-30 18:55 matzon [...1798 lines suppressed...] 2005-01-27 22:26 elias_naur * src/native/: linux/org_lwjgl_opengl_Display.c, linux/org_lwjgl_opengl_Pbuffer.c, macosx/org_lwjgl_opengl_Display.m, win32/org_lwjgl_opengl_Display.c: Renamed org.lwjgl.opengl.Window.allowSoftwareOpenGL to org.lwjgl.opengl.Display.allowSoftwareOpenGL 2005-01-26 23:48 spasi * src/java/org/lwjgl/opengl/glu/MipMap.java: Optimized buffer allocation 2005-01-25 23:06 matzon * www/: changelog.php, download.php, index.php, changelogs/0.95-changelog.txt, changelogs/full-changelog.txt: updated for 0.95 release Index: full-changelog.txt =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/www/changelogs/full-changelog.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- full-changelog.txt 25 Jan 2005 22:06:56 -0000 1.6 +++ full-changelog.txt 30 Mar 2005 19:46:19 -0000 1.7 @@ -1,3 +1,1841 @@ +2005-03-30 19:51 matzon + + * build.xml: dont include generator in javadoc + +2005-03-30 19:44 matzon + + * doc/README: removed reference to lwjgl_media, extracted into dir + instead + +2005-03-30 19:40 matzon + [...1920 lines suppressed...] -2002-08-25 12:04 cix_foo - - * doc/tutorial/skeleton_code.html: Tweaks - 2002-08-25 10:41 matzon * src/java/org/lwjgl/openal/OpenALTest.java: removing from openal @@ -11578,11 +13378,6 @@ * src/java/org/lwjgl/input/: GamePad.java, Joystick.java, Mouse.java: Buffering added -2002-08-24 18:34 cix_foo - - * doc/tutorial/: index.html, skeleton_code.html: Rough incomplete - draft - 2002-08-24 11:32 cix_foo * src/native/common/: .cvsignore, org_lwjgl_Math.h, |
|
From: Brian M. <ma...@us...> - 2005-03-30 19:47:20
|
Update of /cvsroot/java-game-lib/LWJGL/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30590 Modified Files: changelog.php Log Message: 0.96 specific files Index: changelog.php =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/www/changelog.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- changelog.php 25 Jan 2005 22:06:44 -0000 1.9 +++ changelog.php 30 Mar 2005 19:46:12 -0000 1.10 @@ -17,6 +17,7 @@ </p> <ul> <li><a href="http://www.lwjgl.org/changelogs/full-changelog.txt" target="_blank">Full changelog</a></li> + <li><a href="#0.95">LWJGL 0.96</a></li> <li><a href="#0.95">LWJGL 0.95</a></li> <li><a href="#0.94">LWJGL 0.94</a></li> <li><a href="#0.93">LWJGL 0.93</a></li> @@ -34,6 +35,7 @@ </ul> <? +displayChangelog('0.96'); displayChangelog('0.95'); displayChangelog('0.94'); displayChangelog('0.93'); |
|
From: Brian M. <ma...@us...> - 2005-03-30 17:51:13
|
Update of /cvsroot/java-game-lib/LWJGL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2418 Modified Files: build.xml Log Message: dont include generator in javadoc Index: build.xml =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/build.xml,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- build.xml 21 Mar 2005 08:27:38 -0000 1.73 +++ build.xml 30 Mar 2005 17:51:02 -0000 1.74 @@ -60,6 +60,7 @@ <include name="**/*.java" /> <exclude name="org/lwjgl/test/**" /> <exclude name="org/lwjgl/examples/**" /> + <exclude name="org/lwjgl/util/generator/**" /> </fileset> <!-- Files to include in common package --> |
|
From: Brian M. <ma...@us...> - 2005-03-30 17:45:03
|
Update of /cvsroot/java-game-lib/LWJGL/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31674 Modified Files: README Log Message: removed reference to lwjgl_media, extracted into dir instead Index: README =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/doc/README,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- README 30 Mar 2005 17:40:11 -0000 1.12 +++ README 30 Mar 2005 17:44:54 -0000 1.13 @@ -10,10 +10,9 @@ To run some of the included tests: Extract the archive, and cd into directory - Extract media archive into a new root folder called 'res' (please substitute ; and \ according to platform) - java -cp .;res;jar\lwjgl.jar;jar\lwjgl_media.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar; -Djava.library.path=native TEST + java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar; -Djava.library.path=native TEST (this specifies that the jvm should locate the lwjgl native libs in 'native' directory) where TEST is one of the following: @@ -59,7 +58,7 @@ org.lwjgl.test.devil.BasicTest You may also run the Space invaders demo by executing: - java -cp jar\lwjgl.jar;jar\lwjgl_media.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar; -Djava.library.path=native org.lwjgl.examples.spaceinvaders.Game + java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar; -Djava.library.path=native org.lwjgl.examples.spaceinvaders.Game Project Webpage: www.lwjgl.org Project Forum: forum.lwjgl.org |
|
From: Brian M. <ma...@us...> - 2005-03-30 17:40:25
|
Update of /cvsroot/java-game-lib/LWJGL/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29158 Modified Files: README Log Message: added some words about fmod Index: README =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/doc/README,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- README 30 Mar 2005 17:38:23 -0000 1.11 +++ README 30 Mar 2005 17:40:11 -0000 1.12 @@ -5,6 +5,8 @@ file, please download it from the cvs server. Please note that DevIL and OpenAL are distributed along side. Their license is also included. +If you want to use FMOD you must download the binary from their site: http://fmod.org. Please +note that FMOD is a commercial offering and you must accept their license before using. To run some of the included tests: Extract the archive, and cd into directory |
|
From: Brian M. <ma...@us...> - 2005-03-30 17:38:51
|
Update of /cvsroot/java-game-lib/LWJGL/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27917 Modified Files: README Log Message: updated readme to new distribution layout Index: README =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/doc/README,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- README 25 Jan 2005 20:58:48 -0000 1.10 +++ README 30 Mar 2005 17:38:23 -0000 1.11 @@ -4,18 +4,22 @@ the license as stated in the LICENSE file. If you have not received this file, please download it from the cvs server. +Please note that DevIL and OpenAL are distributed along side. Their license is also included. + To run some of the included tests: Extract the archive, and cd into directory - Extract the media files into lwjgl folder (only needed for openal tests) + Extract media archive into a new root folder called 'res' + (please substitute ; and \ according to platform) - java -cp lwjgl.jar;lwjgl_media.jar;lwjgl_test.jar;lwjgl_util.jar;lwjgl_fmod3.jar; TEST - or - java -cp lwjgl.jar;lwjgl_media.jar;lwjgl_test.jar;lwjgl_util.jar;lwjgl_fmod3.jar; -Djava.library.path=. TEST - (this specifies that the jvm should locate the lwjgl native libs in current - directory) + java -cp .;res;jar\lwjgl.jar;jar\lwjgl_media.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar; -Djava.library.path=native TEST + (this specifies that the jvm should locate the lwjgl native libs in 'native' directory) where TEST is one of the following: + org.lwjgl.test.WindowCreationTest + org.lwjgl.test.SysTest + org.lwjgl.test.DisplayTest + org.lwjgl.test.input.MouseCreationTest org.lwjgl.test.input.MouseTest org.lwjgl.test.input.HWCursorTest @@ -50,8 +54,10 @@ org.lwjgl.test.fmod3.StreamTest org.lwjgl.test.fmod3.SyncTest + org.lwjgl.test.devil.BasicTest + You may also run the Space invaders demo by executing: - java -cp lwjgl.jar;lwjgl_media.jar;lwjgl_test.jar;lwjgl_util.jar; org.lwjgl.examples.spaceinvaders.Game + java -cp jar\lwjgl.jar;jar\lwjgl_media.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar; -Djava.library.path=native org.lwjgl.examples.spaceinvaders.Game Project Webpage: www.lwjgl.org Project Forum: forum.lwjgl.org |
|
From: Brian M. <ma...@us...> - 2005-03-30 16:55:25
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4264 Modified Files: Makefile Log Message: added X11R6 to path Index: Makefile =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/Makefile,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Makefile 22 Feb 2005 13:14:05 -0000 1.19 +++ Makefile 30 Mar 2005 16:55:09 -0000 1.20 @@ -4,7 +4,7 @@ LINKER=gcc STRIP=strip CFLAGS_LINK=-shared -Wall -LIBS=-L/usr/X11/lib -lX11 -lXext -lXxf86vm -lpthread -L$(JAVA_HOME)/jre/lib/i386 -ljawt -Wl,-static,-lXcursor,-lXrender,-lXrandr,-call_shared +LIBS=-L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86vm -lpthread -L$(JAVA_HOME)/jre/lib/i386 -ljawt -Wl,-static,-lXcursor,-lXrender,-lXrandr,-call_shared CFLAGS_O=-fPIC -O2 -D_X11 -Wall -pthread -c -I../common -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux SRC=$(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../common/arb/*.c) $(wildcard ../common/ati/*.c) $(wildcard ../common/ext/*.c) $(wildcard ../common/nv/*.c) OBJECTS=$(subst .c,.o,$(SRC)) |
|
From: Elias N. <eli...@us...> - 2005-03-30 10:46:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23751/src/native/win32 Modified Files: context.c org_lwjgl_opengl_Display.c Log Message: Win32: Always sepcify WS_CLIPCHILDREN | WS_CLIPSIBLINGS in window style flags, since it is required for SetPixelFormat to work (according to MSDN docs) Index: org_lwjgl_opengl_Display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Display.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- org_lwjgl_opengl_Display.c 22 Mar 2005 12:34:58 -0000 1.19 +++ org_lwjgl_opengl_Display.c 30 Mar 2005 10:46:21 -0000 1.20 @@ -383,8 +383,9 @@ windowflags = WS_POPUP; } else { exstyle = WS_EX_APPWINDOW; - windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_MINIMIZEBOX | WS_SYSMENU; + windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU; } + windowflags = windowflags | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; // If we're not a fullscreen window, adjust the height to account for the // height of the title bar: Index: context.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/context.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- context.c 2 Mar 2005 08:26:36 -0000 1.4 +++ context.c 30 Mar 2005 10:46:21 -0000 1.5 @@ -130,8 +130,9 @@ windowflags = WS_POPUP; } else { exstyle = WS_EX_APPWINDOW; - windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_MINIMIZEBOX | WS_SYSMENU; + windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU; } + windowflags = windowflags | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; // If we're not a fullscreen window, adjust the height to account for the // height of the title bar (unless undecorated) |
|
From: Elias N. <eli...@us...> - 2005-03-30 08:49:10
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22488 Added Files: org_lwjgl_opengl_MacOSXContextImplementation.m Log Message: --- NEW FILE: org_lwjgl_opengl_MacOSXContextImplementation.m --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_opengl_MacOSXContextImplementation.m,v 1.1 2005/03/30 08:49:02 elias_naur Exp $ * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ #import <jni.h> #import <Cocoa/Cocoa.h> #import "org_lwjgl_opengl_MacOSXContextImplementation.h" #import "context.h" #import "common_tools.h" typedef struct { NSOpenGLContext *context; } MacOSXContext; JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nCreate (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject shared_context_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXPeerInfo *peer_info; MacOSXContext *shared_context_info; MacOSXContext *context_info; NSOpenGLContext *context; NSOpenGLContext *shared_context = NULL; jobject context_handle = newJavaManagedByteBuffer(env, sizeof(MacOSXContext)); if (context_handle == NULL) { throwException(env, "Could not create handle buffer"); return NULL; } peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); if (shared_context_handle != NULL) { shared_context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, shared_context_handle); shared_context = shared_context_info->context; } context = [[NSOpenGLContext alloc] initWithFormat:peer_info->pixel_format shareContext:shared_context]; if (context == NULL) { throwException(env, "Could not create context"); return NULL; } context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); context_info->context = context; [pool release]; return context_handle; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSwapBuffers (JNIEnv *env, jclass clazz, jobject context_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXContext *peer_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); [peer_info->context flushBuffer]; [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nUpdate (JNIEnv *env, jclass clazz, jobject context_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); [context_info->context update]; [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_clearDrawable (JNIEnv *env, jclass clazz, jobject context_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); [context_info->context clearDrawable]; [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nReleaseCurrentContext (JNIEnv *env, jclass clazz) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [NSOpenGLContext clearCurrentContext]; [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_setView (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject context_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); if (peer_info->window) { [context_info->context setView: peer_info->nsview]; } else { [context_info->context setPixelBuffer:peer_info->pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:0]; } [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nMakeCurrent (JNIEnv *env, jclass clazz, jobject context_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); [context_info->context makeCurrentContext]; [pool release]; } JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nIsCurrent (JNIEnv *env, jclass clazz, jobject context_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); bool result = context_info->context == [NSOpenGLContext currentContext]; [pool release]; return result ? JNI_TRUE : JNI_FALSE; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSetVSync (JNIEnv *env, jclass clazz, jobject context_handle, jboolean enable) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); long vsync_value = enable == JNI_TRUE ? 1 : 0; [context_info->context setValues:&vsync_value forParameter:NSOpenGLCPSwapInterval]; [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nDestroy (JNIEnv *env, jclass clazz, jobject context_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); [context_info->context clearDrawable]; [context_info->context release]; [pool release]; } |
|
From: Elias N. <eli...@us...> - 2005-03-30 08:32:25
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12418/src/java/org/lwjgl/openal Modified Files: AL.java Log Message: Fix linux openal library name Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- AL.java 28 Mar 2005 12:44:33 -0000 1.39 +++ AL.java 30 Mar 2005 08:32:15 -0000 1.40 @@ -144,7 +144,7 @@ } String[] oalPaths = LWJGLUtil.getLibraryPaths(new String[]{ "lwjglaudio", "lwjglaudio.dll", - "openal", "openal.so", + "openal", "libopenal.so", "openal", "openal.dylib"}, AL.class.getClassLoader()); nCreate(oalPaths); created = true; |
|
From: Brian M. <ma...@us...> - 2005-03-29 20:47:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32737/src/java/org/lwjgl/test Modified Files: SysTest.java Log Message: updated text to print proper org.lwjgl.util.Debug Index: SysTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/SysTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- SysTest.java 29 Mar 2005 18:09:31 -0000 1.8 +++ SysTest.java 29 Mar 2005 20:47:25 -0000 1.9 @@ -72,7 +72,7 @@ LWJGLUtil.log("Debug is enabled, you should now see output from LWJGL during the following tests."); } else { System.out.println("Debug is not enabled. Please set the org.lwjgl.Sys.debug property to true to enable debugging"); - System.out.println("Example:\n java -Dorg.lwjgl.Sys.debug=true ..."); + System.out.println("Example:\n java -Dorg.lwjgl.util.Debug=true ..."); System.out.println("You will not see any debug output in the following tests."); } |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:43:57
|
Update of /cvsroot/java-game-lib/LWJGL/platform_build/win32_ms_cmdline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26812 Modified Files: build.bat Log Message: added comment about /delayload - default to free toolkit Index: build.bat =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_ms_cmdline/build.bat,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- build.bat 14 Mar 2005 11:42:46 -0000 1.17 +++ build.bat 29 Mar 2005 18:43:49 -0000 1.18 @@ -6,11 +6,23 @@ if "%ALHOME%" == "" goto erroralhome if "%DXHOME%" == "" goto errordxhome set COPTIONS=/I"%DXHOME%\include" /I"%CHOME%\include" /I"%PLTSDKHOME%\include" /I"%JAVA_HOME%\include" /I"%JAVA_HOME%\include\win32" /I"%ALHOME%\include" /I"..\..\src\native\common" /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "LWJGL_EXPORTS" /D "_WINDLL" -rem Can't get /DELAYLOAD to work -rem set LINKEROPTS=/link /LIBPATH:"%JAVA_HOME%\lib" /LIBPATH:"%ALHOME%\libs" /LIBPATH:"%DXHOME%\Lib" /LIBPATH:"%PLTSDKHOME%\Lib" /LIBPATH:"%CHOME%\Lib" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 /NOLOGO /DLL /DELAYLOAD:jawt.dll -rem set LIBS=dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib +rem ************************************************* +rem ** Build using free compiler requires jawt.dll ** +rem ** and awt.dll in current dir. /delayload ** +rem ** fixes this, but is not available in free ** +rem ** toolkit. Alternatively, remove AWT support ** +rem ** all together (only works on win32) ** +rem ************************************************* set LINKEROPTS=/link /LIBPATH:"%JAVA_HOME%\lib" /LIBPATH:"%ALHOME%\libs" /LIBPATH:"%DXHOME%\Lib" /LIBPATH:"%PLTSDKHOME%\Lib" /LIBPATH:"%CHOME%\Lib" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 /NOLOGO /DLL -set LIBS=Kernel32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib winmm.lib +set LIBS=dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib winmm.lib + +rem ************************************************* +rem ** Use the following lines below to build ** +rem ** using the commercial toolkit which allows ** +rem ** delayload option. íe. Release build. ** +rem ************************************************* +rem set LINKEROPTS=/link /LIBPATH:"%JAVA_HOME%\lib" /LIBPATH:"%ALHOME%\libs" /LIBPATH:"%DXHOME%\Lib" /LIBPATH:"%PLTSDKHOME%\Lib" /LIBPATH:"%CHOME%\Lib" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 /NOLOGO /DLL /DELAYLOAD:jawt.dll +rem set LIBS=Kernel32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib for %%x in (..\..\src\native\win32\*.c) do cl %COPTIONS% %%x for %%x in (..\..\src\native\common\*.c) do cl %COPTIONS% %%x |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:10:18
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/java/org/lwjgl/util Modified Files: Display.java WaveData.java Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: WaveData.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/WaveData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- WaveData.java 25 Feb 2005 20:24:11 -0000 1.1 +++ WaveData.java 29 Mar 2005 18:09:32 -0000 1.2 @@ -94,7 +94,7 @@ AudioSystem.getAudioInputStream( new BufferedInputStream(WaveData.class.getClassLoader().getResourceAsStream(filepath)))); } catch (Exception e) { - org.lwjgl.Sys.log("Unable to load file: " + filepath); + org.lwjgl.LWJGLUtil.log("Unable to load file: " + filepath); e.printStackTrace(); return null; } Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/Display.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Display.java 20 Feb 2005 11:24:21 -0000 1.8 +++ Display.java 29 Mar 2005 18:09:32 -0000 1.9 @@ -36,7 +36,7 @@ import java.util.Arrays; import java.util.Comparator; -import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.DisplayMode; @@ -71,7 +71,7 @@ // First get the available display modes DisplayMode[] modes = org.lwjgl.opengl.Display.getAvailableDisplayModes(); - if (Sys.DEBUG || DEBUG) { + if (LWJGLUtil.DEBUG || DEBUG) { System.out.println("Available screen modes:"); for (int i = 0; i < modes.length; i ++) { System.out.println(modes[i]); @@ -107,7 +107,7 @@ DisplayMode[] ret = new DisplayMode[matches.size()]; matches.toArray(ret); - if (Sys.DEBUG && DEBUG) { + if (LWJGLUtil.DEBUG && DEBUG) { System.out.println("Filtered screen modes:"); for (int i = 0; i < ret.length; i ++) { System.out.println(ret[i]); @@ -210,7 +210,7 @@ Arrays.sort(dm, new Sorter()); // Try them out in the appropriate order - if (Sys.DEBUG || DEBUG) { + if (LWJGLUtil.DEBUG || DEBUG) { System.out.println("Sorted display modes:"); for (int i = 0; i < dm.length; i ++) { System.out.println(dm[i]); @@ -218,12 +218,12 @@ } for (int i = 0; i < dm.length; i ++) { try { - if (Sys.DEBUG || DEBUG) + if (LWJGLUtil.DEBUG || DEBUG) System.out.println("Attempting to set displaymode: "+dm[i]); org.lwjgl.opengl.Display.setDisplayMode(dm[i]); return dm[i]; } catch (Exception e) { - if (Sys.DEBUG || DEBUG) { + if (LWJGLUtil.DEBUG || DEBUG) { System.out.println("Failed to set display mode to "+dm[i]); e.printStackTrace(); } |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:10:13
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/java/org/lwjgl/test/openal Modified Files: PositionTest.java Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: PositionTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PositionTest.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- PositionTest.java 25 Feb 2005 20:24:10 -0000 1.25 +++ PositionTest.java 29 Mar 2005 18:09:31 -0000 1.26 @@ -35,7 +35,7 @@ import java.nio.IntBuffer; import org.lwjgl.BufferUtils; -import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.openal.AL; @@ -145,7 +145,7 @@ // Setup Window // ===================================================== - Sys.log("Setting up window"); + LWJGLUtil.log("Setting up window"); // calc center int centerX = (Display.getDisplayMode().getWidth() - WINDOW_WIDTH) / 2; @@ -158,7 +158,7 @@ // Setup OpenGL // ===================================================== - Sys.log("Setting up OpenGL"); + LWJGLUtil.log("Setting up OpenGL"); GL11.glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT); GL11.glMatrixMode(GL11.GL_PROJECTION); @@ -175,7 +175,7 @@ // Setup OpenAL // ===================================================== - Sys.log("Setting up OpenAL"); + LWJGLUtil.log("Setting up OpenAL"); AL.create(); @@ -184,7 +184,7 @@ AL10.alListener(AL10.AL_ORIENTATION, listenerOrientation); // creating buffers - Sys.log("Creating buffers"); + LWJGLUtil.log("Creating buffers"); AL10.alGenBuffers(soundBuffers); soundBuffers.rewind(); @@ -193,9 +193,9 @@ soundSources.rewind(); // load sound files (left, center, right).wav - Sys.log("Loading soundfiles..."); + LWJGLUtil.log("Loading soundfiles..."); - Sys.log("Loading left.wav"); + LWJGLUtil.log("Loading left.wav"); WaveData left = WaveData.create("left.wav"); AL10.alBufferData(soundBuffers.get(LEFT), left.format, left.data, left.samplerate); AL10.alSourcef(soundSources.get(LEFT), AL10.AL_PITCH, 1.0f); @@ -205,7 +205,7 @@ AL10.alSourcei(soundSources.get(LEFT), AL10.AL_BUFFER, soundBuffers.get(LEFT)); AL10.alSourcei(soundSources.get(LEFT), AL10.AL_LOOPING, AL10.AL_TRUE); - Sys.log("Loading center.wav"); + LWJGLUtil.log("Loading center.wav"); WaveData center = WaveData.create("center.wav"); AL10.alBufferData(soundBuffers.get(CENTER), center.format, center.data, center.samplerate); AL10.alSourcef(soundSources.get(CENTER), AL10.AL_PITCH, 1.0f); @@ -215,7 +215,7 @@ AL10.alSourcei(soundSources.get(CENTER), AL10.AL_BUFFER, soundBuffers.get(CENTER)); AL10.alSourcei(soundSources.get(CENTER), AL10.AL_LOOPING, AL10.AL_TRUE); - Sys.log("Loading right.wav"); + LWJGLUtil.log("Loading right.wav"); WaveData right = WaveData.create("right.wav"); AL10.alBufferData(soundBuffers.get(RIGHT), right.format, right.data, right.samplerate); AL10.alSourcef(soundSources.get(RIGHT), AL10.AL_PITCH, 1.0f); @@ -225,7 +225,7 @@ AL10.alSourcei(soundSources.get(RIGHT), AL10.AL_BUFFER, soundBuffers.get(RIGHT)); AL10.alSourcei(soundSources.get(RIGHT), AL10.AL_LOOPING, AL10.AL_TRUE); - Sys.log("Soundfiles loaded successfully"); + LWJGLUtil.log("Soundfiles loaded successfully"); // ----------------------------------------------------- Mouse.setGrabbed(true); @@ -245,16 +245,16 @@ System.out.println("Press LEFT or RIGHT mouse button to move along z axis"); System.out.println("Press ESC to exit demo"); - Sys.log( + LWJGLUtil.log( "Listener position: " + listenerPosition.get(0) + ", " + listenerPosition.get(1) + ", " + listenerPosition.get(2)); - Sys.log("Left position: " + leftPosition.get(0) + ", " + leftPosition.get(1) + ", " + leftPosition.get(2)); - Sys.log("Center position: " + centerPosition.get(0) + ", " + centerPosition.get(1) + ", " + centerPosition.get(2)); - Sys.log("Right position: " + rightPosition.get(0) + ", " + rightPosition.get(1) + ", " + rightPosition.get(2)); + LWJGLUtil.log("Left position: " + leftPosition.get(0) + ", " + leftPosition.get(1) + ", " + leftPosition.get(2)); + LWJGLUtil.log("Center position: " + centerPosition.get(0) + ", " + centerPosition.get(1) + ", " + centerPosition.get(2)); + LWJGLUtil.log("Right position: " + rightPosition.get(0) + ", " + rightPosition.get(1) + ", " + rightPosition.get(2)); while (!finished) { // handle any input @@ -333,17 +333,17 @@ // ============================================ if (Keyboard.isKeyDown(Keyboard.KEY_1)) { AL10.alSourcePlay(soundSources.get(LEFT)); - Sys.log("Playing left.wav"); + LWJGLUtil.log("Playing left.wav"); } if (Keyboard.isKeyDown(Keyboard.KEY_2)) { AL10.alSourcePlay(soundSources.get(CENTER)); - Sys.log("Playing center.wav"); + LWJGLUtil.log("Playing center.wav"); } if (Keyboard.isKeyDown(Keyboard.KEY_3)) { AL10.alSourcePlay(soundSources.get(RIGHT)); - Sys.log("Playing right.wav"); + LWJGLUtil.log("Playing right.wav"); } // -------------------------------------------- @@ -351,17 +351,17 @@ // ============================================ if (Keyboard.isKeyDown(Keyboard.KEY_4)) { AL10.alSourceStop(soundSources.get(LEFT)); - Sys.log("Stopped left.wav"); + LWJGLUtil.log("Stopped left.wav"); } if (Keyboard.isKeyDown(Keyboard.KEY_5)) { AL10.alSourceStop(soundSources.get(CENTER)); - Sys.log("Stopped center.wav"); + LWJGLUtil.log("Stopped center.wav"); } if (Keyboard.isKeyDown(Keyboard.KEY_6)) { AL10.alSourceStop(soundSources.get(RIGHT)); - Sys.log("Stopped right.wav"); + LWJGLUtil.log("Stopped right.wav"); } // -------------------------------------------- @@ -465,13 +465,13 @@ * Shutdown of demonstration */ private void shutdown() { - Sys.log("Shutting down OpenAL"); + LWJGLUtil.log("Shutting down OpenAL"); AL10.alSourceStop(soundSources); AL10.alDeleteSources(soundSources); AL10.alDeleteBuffers(soundBuffers); AL.destroy(); - Sys.log("Shutting down Window"); + LWJGLUtil.log("Shutting down Window"); Display.destroy(); } |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:10:13
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/java/org/lwjgl/test Modified Files: SysTest.java Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: SysTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/SysTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- SysTest.java 20 Feb 2005 11:24:18 -0000 1.7 +++ SysTest.java 29 Mar 2005 18:09:31 -0000 1.8 @@ -32,6 +32,7 @@ package org.lwjgl.test; import org.lwjgl.opengl.Display; +import org.lwjgl.LWJGLUtil; import org.lwjgl.Sys; import org.lwjgl.LWJGLException; @@ -67,8 +68,8 @@ */ private void testDebug() { System.out.println("==== Test Debug ===="); - if (Sys.DEBUG) { - Sys.log("Debug is enabled, you should now see output from LWJGL during the following tests."); + if (LWJGLUtil.DEBUG) { + LWJGLUtil.log("Debug is enabled, you should now see output from LWJGL during the following tests."); } else { System.out.println("Debug is not enabled. Please set the org.lwjgl.Sys.debug property to true to enable debugging"); System.out.println("Example:\n java -Dorg.lwjgl.Sys.debug=true ..."); |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/java/org/lwjgl/opengl Modified Files: Context.java Display.java GLContext.java LinuxDisplay.java MacOSXDisplay.java Pbuffer.java Win32Display.java Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: Win32Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Win32Display.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Win32Display.java 24 Feb 2005 13:24:08 -0000 1.15 +++ Win32Display.java 29 Mar 2005 18:09:30 -0000 1.16 @@ -42,7 +42,7 @@ import java.nio.FloatBuffer; import java.nio.IntBuffer; -import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; import org.lwjgl.input.Cursor; @@ -84,7 +84,7 @@ if (Display.getContext().isCurrent()) Display.getContext().makeCurrent(); } catch (LWJGLException e) { - Sys.log("Exception occurred while trying to make context current: " + e); + LWJGLUtil.log("Exception occurred while trying to make context current: " + e); } } } @@ -129,7 +129,7 @@ // Return the capabilities of a minimum pixel format return nGetPbufferCapabilities(new PixelFormat(0, 0, 0, 0, 0, 0, 0, 0, false)); } catch (LWJGLException e) { - Sys.log("Exception occurred while determining pbuffer capabilities: " + e); + LWJGLUtil.log("Exception occurred while determining pbuffer capabilities: " + e); return 0; } } Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- Pbuffer.java 23 Feb 2005 11:11:07 -0000 1.39 +++ Pbuffer.java 29 Mar 2005 18:09:30 -0000 1.40 @@ -34,6 +34,7 @@ import java.nio.ByteBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; import org.lwjgl.Sys; /** @@ -250,7 +251,7 @@ peer_info.destroy(); destroyed = true; } catch (LWJGLException e) { - Sys.log("Exception occurred while destroying pbuffer: " + e); + LWJGLUtil.log("Exception occurred while destroying pbuffer: " + e); } } Index: LinuxDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- LinuxDisplay.java 29 Mar 2005 11:31:21 -0000 1.21 +++ LinuxDisplay.java 29 Mar 2005 18:09:30 -0000 1.22 @@ -42,7 +42,7 @@ import java.nio.FloatBuffer; import java.nio.IntBuffer; -import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; import org.lwjgl.input.Keyboard; @@ -383,7 +383,7 @@ decDisplay(); return caps; } catch (LWJGLException e) { - Sys.log("Exception occurred in getPbufferCapabilities: " + e); + LWJGLUtil.log("Exception occurred in getPbufferCapabilities: " + e); return 0; } finally { unlockAWT(); Index: Context.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Context.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Context.java 23 Feb 2005 12:12:46 -0000 1.3 +++ Context.java 29 Mar 2005 18:09:29 -0000 1.4 @@ -34,6 +34,7 @@ import java.nio.ByteBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; import org.lwjgl.Sys; /** @@ -198,7 +199,7 @@ thread = null; GLContext.unloadOpenGLLibrary(); } catch (LWJGLException e) { - Sys.log("Exception occurred while destroying context: " + e); + LWJGLUtil.log("Exception occurred while destroying context: " + e); } } } Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- GLContext.java 21 Feb 2005 14:46:42 -0000 1.48 +++ GLContext.java 29 Mar 2005 18:09:29 -0000 1.49 @@ -32,6 +32,7 @@ package org.lwjgl.opengl; import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; import org.lwjgl.Sys; import java.lang.reflect.Method; @@ -169,7 +170,7 @@ Method init_stubs_method = extension_class.getDeclaredMethod("initNativeStubs", null); init_stubs_method.invoke(null, null); } catch (Exception e) { - Sys.log("Failed to initialize extension " + extension_class + " - exception: " + e); + LWJGLUtil.log("Failed to initialize extension " + extension_class + " - exception: " + e); supported_extensions.remove(ext_name); } } Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- MacOSXDisplay.java 24 Feb 2005 11:09:16 -0000 1.25 +++ MacOSXDisplay.java 29 Mar 2005 18:09:30 -0000 1.26 @@ -57,7 +57,7 @@ import org.lwjgl.LWJGLException; import org.lwjgl.BufferUtils; -import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; import org.lwjgl.input.Keyboard; final class MacOSXDisplay implements DisplayImplementation { @@ -376,7 +376,7 @@ if (major_version > 10 || (major_version == 10 && minor_version >= 3)) return Pbuffer.PBUFFER_SUPPORTED; } catch (Exception e) { - Sys.log("Exception occurred when trying to determine OS version: " + e); + LWJGLUtil.log("Exception occurred when trying to determine OS version: " + e); } return 0; } Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Display.java 23 Feb 2005 11:11:06 -0000 1.45 +++ Display.java 29 Mar 2005 18:09:29 -0000 1.46 @@ -49,6 +49,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; import org.lwjgl.Sys; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; @@ -96,7 +97,7 @@ display_impl = createDisplayImplementation(); try { current_mode = initial_mode = display_impl.init(); - Sys.log("Initial mode: " + initial_mode); + LWJGLUtil.log("Initial mode: " + initial_mode); Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { reset(); @@ -177,7 +178,7 @@ DisplayMode[] filteredModes = new DisplayMode[modes.size()]; modes.toArray(filteredModes); - Sys.log("Removed " + (unfilteredModes.length - filteredModes.length) + " duplicate displaymodes"); + LWJGLUtil.log("Removed " + (unfilteredModes.length - filteredModes.length) + " duplicate displaymodes"); return filteredModes; } @@ -257,7 +258,7 @@ if (context.isCurrent()) Context.releaseCurrentContext(); } catch (LWJGLException e) { - Sys.log("Exception occurred while trying to release context"); + LWJGLUtil.log("Exception occurred while trying to release context"); } if (!window_created) @@ -316,7 +317,7 @@ gammaRamp.put(i, rampEntry); } display_impl.setGammaRamp(gammaRamp); - Sys.log("Gamma set, gamma = " + gamma + ", brightness = " + brightness + ", contrast = " + contrast); + LWJGLUtil.log("Gamma set, gamma = " + gamma + ", brightness = " + brightness + ", contrast = " + contrast); } /** @@ -628,10 +629,10 @@ try { Mouse.create(); } catch (LWJGLException e) { - if (Sys.DEBUG) { + if (LWJGLUtil.DEBUG) { e.printStackTrace(System.err); } else { - Sys.log("Failed to create Mouse: "+e); + LWJGLUtil.log("Failed to create Mouse: "+e); } } } @@ -639,10 +640,10 @@ try { Keyboard.create(); } catch (LWJGLException e) { - if (Sys.DEBUG) { + if (LWJGLUtil.DEBUG) { e.printStackTrace(System.err); } else { - Sys.log("Failed to create Keyboard: "+e); + LWJGLUtil.log("Failed to create Keyboard: "+e); } } } |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:10:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/java/org/lwjgl Modified Files: J2SESysImplementation.java LWJGLUtil.java Sys.java Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: J2SESysImplementation.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/J2SESysImplementation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- J2SESysImplementation.java 20 Jan 2005 22:51:26 -0000 1.1 +++ J2SESysImplementation.java 29 Mar 2005 18:09:26 -0000 1.2 @@ -63,7 +63,7 @@ return (String)transferable.getTransferData(java.awt.datatransfer.DataFlavor.stringFlavor); } } catch (Exception e) { - Sys.log("Exception while getting clipboard: " + e); + LWJGLUtil.log("Exception while getting clipboard: " + e); } return null; } Index: LWJGLUtil.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/LWJGLUtil.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- LWJGLUtil.java 28 Mar 2005 12:44:32 -0000 1.1 +++ LWJGLUtil.java 29 Mar 2005 18:09:26 -0000 1.2 @@ -32,7 +32,6 @@ package org.lwjgl; import org.lwjgl.LWJGLException; -import org.lwjgl.Sys; import java.io.File; import java.lang.reflect.Method; @@ -51,7 +50,10 @@ */ public class LWJGLUtil { - /** + /** Debug flag. */ + public static final boolean DEBUG = Boolean.getBoolean("org.lwjgl.util.Debug"); + + /** * Locates the paths required by a library. * * @param libNames List of library names to look for, in the form of Local Library name, Platform library name. @@ -89,13 +91,13 @@ String classloader_path = LWJGLUtil.getPathFromClassLoader(libname, classloader); if (classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + classloader_path); + LWJGLUtil.log("getPathFromClassLoader: Path found: " + classloader_path); possible_paths.add(classloader_path); } String lwjgl_classloader_path = LWJGLUtil.getPathFromClassLoader("lwjgl", classloader); if (lwjgl_classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); + LWJGLUtil.log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) + File.separator + platform_lib_name); } @@ -123,7 +125,7 @@ */ public static String getPathFromClassLoader(String libname, ClassLoader classloader) { try { - Sys.log("getPathFromClassLoader: searching for: " + libname); + LWJGLUtil.log("getPathFromClassLoader: searching for: " + libname); Object o = classloader; Class c = o.getClass(); while (c != null) { @@ -137,8 +139,19 @@ } } } catch (Exception e) { - Sys.log("Failure locating " + e + " using classloader:" + e); + LWJGLUtil.log("Failure locating " + e + " using classloader:" + e); } return null; } + + /** + * Prints the given message to System.err if DEBUG is true. + * + * @param msg Message to print + */ + public static void log(String msg) { + if (LWJGLUtil.DEBUG) { + System.err.println(msg); + } + } } Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- Sys.java 16 Mar 2005 21:18:40 -0000 1.83 +++ Sys.java 29 Mar 2005 18:09:27 -0000 1.84 @@ -53,10 +53,7 @@ /** The native library name */ private static final String LIBRARY_NAME = "lwjgl"; - /** Debug flag. */ - public static final boolean DEBUG = Boolean.getBoolean("org.lwjgl.Sys.debug"); - - /** OS Name */ + /** OS Name */ private final static String OS_NAME = System.getProperty("os.name"); /** The implementation instance to delegate platform specific behavior to */ @@ -69,7 +66,7 @@ if (!native_version.equals(VERSION)) throw new LinkageError("Version mismatch: jar version is '" + VERSION + "', native libary version is '" + native_version + "'"); - implementation.setDebug(DEBUG); + implementation.setDebug(LWJGLUtil.DEBUG); } private static SysImplementation createImplementation() { @@ -101,16 +98,6 @@ } /** - * Prints the given message to System.err if isDebugEnabled() - * is true. - */ - public static void log(String msg) { - if (Sys.DEBUG) { - System.err.println(msg); - } - } - - /** * Initialization. This is just a dummy method to trigger the static constructor. */ public static void initialize() { |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:10:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/java/org/lwjgl/fmod3 Modified Files: FMOD.java Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: FMOD.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- FMOD.java 16 Mar 2005 21:18:40 -0000 1.9 +++ FMOD.java 29 Mar 2005 18:09:28 -0000 1.10 @@ -38,7 +38,7 @@ import java.util.HashMap; import java.util.StringTokenizer; -import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; /** * $Id$ @@ -276,7 +276,7 @@ } String jwsPath = getPathFromJWS(dllName); - Sys.log("getPathFromJWS: Paths found: " + jwsPath); + LWJGLUtil.log("getPathFromJWS: Paths found: " + jwsPath); if (jwsPath != null) { libpath += seperator + jwsPath.substring(0, jwsPath.lastIndexOf(File.separator)); @@ -292,7 +292,7 @@ } for(int i=0 ; i<paths.length; i++) { - Sys.log("Will search " + paths[i] + " for " + dllName); + LWJGLUtil.log("Will search " + paths[i] + " for " + dllName); } //add cwd path @@ -329,7 +329,7 @@ */ private static String getPathFromJWS(String libname) { try { - Sys.log("getPathFromJWS: searching for: " + libname); + LWJGLUtil.log("getPathFromJWS: searching for: " + libname); Object o = FMOD.class.getClassLoader(); Class c = o.getClass(); Method findLibrary = @@ -338,7 +338,7 @@ return (String) findLibrary.invoke(o, arguments); } catch (Exception e) { - Sys.log("Failure locating FMOD using classloader:" + e); + LWJGLUtil.log("Failure locating FMOD using classloader:" + e); } return null; } @@ -360,7 +360,7 @@ if (callbackList == null ) { if (callbackHandler == null) { - Sys.log("No callbackhandlers registered for handle: " + handle); + LWJGLUtil.log("No callbackhandlers registered for handle: " + handle); } else { callbackList = new ArrayList(); callbacks[type].put(callbackID, callbackList); |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:10:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/java/org/lwjgl/input Modified Files: Mouse.java Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- Mouse.java 18 Jan 2005 16:42:28 -0000 1.74 +++ Mouse.java 29 Mar 2005 18:09:28 -0000 1.75 @@ -38,6 +38,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; import org.lwjgl.Sys; import org.lwjgl.opengl.Display; @@ -526,7 +527,7 @@ try { setNativeCursor(currentCursor); } catch (LWJGLException e) { - if (Sys.DEBUG) e.printStackTrace(); + if (LWJGLUtil.DEBUG) e.printStackTrace(); } } } |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:09:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/native/common Modified Files: common_tools.c Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: common_tools.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- common_tools.c 16 Mar 2005 21:18:41 -0000 1.21 +++ common_tools.c 29 Mar 2005 18:09:33 -0000 1.22 @@ -82,7 +82,7 @@ #define BUFFER_SIZE 4000 static char buffer[BUFFER_SIZE]; jstring str; - jclass org_lwjgl_Sys_class; + jclass org_lwjgl_LWJGLUtil_class; jmethodID log_method; va_list ap; va_start(ap, format); @@ -94,9 +94,9 @@ #endif buffer[BUFFER_SIZE - 1] = '\0'; str = (*env)->NewStringUTF(env, buffer); - org_lwjgl_Sys_class = (*env)->FindClass(env, "org/lwjgl/Sys"); - log_method = (*env)->GetStaticMethodID(env, org_lwjgl_Sys_class, "log", "(Ljava/lang/String;)V"); - (*env)->CallStaticVoidMethod(env, org_lwjgl_Sys_class, log_method, str); + org_lwjgl_LWJGLUtil_class = (*env)->FindClass(env, "org/lwjgl/LWJGLUtil"); + log_method = (*env)->GetStaticMethodID(env, org_lwjgl_LWJGLUtil_class, "log", "(Ljava/lang/String;)V"); + (*env)->CallStaticVoidMethod(env, org_lwjgl_LWJGLUtil_class, log_method, str); } va_end(ap); } |
|
From: Brian M. <ma...@us...> - 2005-03-29 18:08:47
|
Update of /cvsroot/java-game-lib/LWJGL/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6115 Modified Files: lwjgl_hidden_switches.text Log Message: moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug Index: lwjgl_hidden_switches.text =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/doc/lwjgl_hidden_switches.text,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- lwjgl_hidden_switches.text 27 Jan 2005 22:08:59 -0000 1.3 +++ lwjgl_hidden_switches.text 29 Mar 2005 18:08:35 -0000 1.4 @@ -9,7 +9,7 @@ org.lwjgl.opengl.Display.nokeyboard Do not create the keyboard when creating the display -org.lwjgl.Sys.debug +org.lwjgl.util.Debug Whether to output debug info org.lwjgl.opengl.Display.allowSoftwareOpenGL |
|
From: Elias N. <eli...@us...> - 2005-03-29 11:31:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18520/src/native/linux Modified Files: org_lwjgl_opengl_Display.c Log Message: Linux: Moved display connection reference count to java. Linux: Load OpenGL library before opening display to work around a crash in NVIDIA drivers. Index: org_lwjgl_opengl_Display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- org_lwjgl_opengl_Display.c 24 Feb 2005 10:44:34 -0000 1.26 +++ org_lwjgl_opengl_Display.c 29 Mar 2005 11:31:22 -0000 1.27 @@ -90,7 +90,6 @@ static int current_screen; static Display *display_connection = NULL; -static int display_connection_usage = 0; static bool async_x_error; static char error_message[ERR_MSG_SIZE]; static Atom warp_atom; @@ -127,36 +126,25 @@ return display_connection; } -static Display *incDisplay(JNIEnv *env) { - if (display_connection_usage == 0) { - async_x_error = false; - XSetErrorHandler(errorHandler); - display_connection = XOpenDisplay(NULL); - if (display_connection == NULL) { - if (env != NULL) - throwException(env, "Could not open X display connection"); - else - printfDebugJava(env, "Could not open X display connection"); - return NULL; - } - current_screen = XDefaultScreen(getDisplay()); - warp_atom = XInternAtom(display_connection, "_LWJGL_WARP", False); - } +static void openDisplay(JNIEnv *env) { async_x_error = false; - display_connection_usage++; - return display_connection; + XSetErrorHandler(errorHandler); + display_connection = XOpenDisplay(NULL); + if (display_connection == NULL) { + throwException(env, "Could not open X display connection"); + return; + } + current_screen = XDefaultScreen(getDisplay()); + warp_atom = XInternAtom(display_connection, "_LWJGL_WARP", False); } Atom getWarpAtom(void) { return warp_atom; } -static void decDisplay(void) { - display_connection_usage--; - if (display_connection_usage == 0) { - XCloseDisplay(display_connection); - display_connection = NULL; - } +static void closeDisplay(void) { + XCloseDisplay(display_connection); + display_connection = NULL; } static void waitMapped(Window win) { @@ -309,12 +297,12 @@ XStoreName(getDisplay(), current_win, title); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_incDisplay(JNIEnv *env, jclass clazz) { - incDisplay(env); +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_openDisplay(JNIEnv *env, jclass clazz) { + openDisplay(env); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_decDisplay(JNIEnv *env, jclass clazz) { - decDisplay(); +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_closeDisplay(JNIEnv *env, jclass clazz) { + closeDisplay(); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplayPeerInfo_initDrawable(JNIEnv *env, jclass clazz, jobject peer_info_handle) { |
|
From: Elias N. <eli...@us...> - 2005-03-29 11:31:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18520/src/java/org/lwjgl/opengl Modified Files: LinuxDisplay.java LinuxDisplayPeerInfo.java LinuxPbufferPeerInfo.java Log Message: Linux: Moved display connection reference count to java. Linux: Load OpenGL library before opening display to work around a crash in NVIDIA drivers. Index: LinuxDisplayPeerInfo.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplayPeerInfo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- LinuxDisplayPeerInfo.java 23 Feb 2005 11:11:07 -0000 1.3 +++ LinuxDisplayPeerInfo.java 29 Mar 2005 11:31:22 -0000 1.4 @@ -47,17 +47,17 @@ public LinuxDisplayPeerInfo(PixelFormat pixel_format) throws LWJGLException { LinuxDisplay.lockAWT(); try { - LinuxDisplay.incDisplay(); + GLContext.loadOpenGLLibrary(); try { - GLContext.loadOpenGLLibrary(); + LinuxDisplay.incDisplay(); try { initDefaultPeerInfo(getHandle(), pixel_format); } catch (LWJGLException e) { - GLContext.unloadOpenGLLibrary(); + LinuxDisplay.decDisplay(); throw e; } } catch (LWJGLException e) { - LinuxDisplay.decDisplay(); + GLContext.unloadOpenGLLibrary(); throw e; } } finally { Index: LinuxPbufferPeerInfo.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxPbufferPeerInfo.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LinuxPbufferPeerInfo.java 23 Feb 2005 11:11:07 -0000 1.2 +++ LinuxPbufferPeerInfo.java 29 Mar 2005 11:31:22 -0000 1.3 @@ -47,17 +47,17 @@ public LinuxPbufferPeerInfo(int width, int height, PixelFormat pixel_format) throws LWJGLException { LinuxDisplay.lockAWT(); try { - LinuxDisplay.incDisplay(); + GLContext.loadOpenGLLibrary(); try { - GLContext.loadOpenGLLibrary(); + LinuxDisplay.incDisplay(); try { nInitHandle(getHandle(), width, height, pixel_format); } catch (LWJGLException e) { - GLContext.unloadOpenGLLibrary(); + LinuxDisplay.decDisplay(); throw e; } } catch (LWJGLException e) { - LinuxDisplay.decDisplay(); + GLContext.unloadOpenGLLibrary(); throw e; } } finally { Index: LinuxDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- LinuxDisplay.java 24 Feb 2005 10:44:33 -0000 1.20 +++ LinuxDisplay.java 29 Mar 2005 11:31:21 -0000 1.21 @@ -50,6 +50,8 @@ final class LinuxDisplay implements DisplayImplementation { private static final int NUM_BUTTONS = 3; + private static int display_connection_usage_count = 0; + private static PeerInfo peer_info; /* Since Xlib is not guaranteed to be thread safe, we need a way to synchronize LWJGL @@ -62,8 +64,24 @@ /** * increment and decrement display usage. */ - static native void incDisplay() throws LWJGLException; - static native void decDisplay(); + static void incDisplay() throws LWJGLException { + if (display_connection_usage_count == 0) { + openDisplay(); + } + display_connection_usage_count++; + } + + static void decDisplay() { + display_connection_usage_count--; + if (display_connection_usage_count < 0) + throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count); + if (display_connection_usage_count == 0) { + closeDisplay(); + } + } + + private static native void openDisplay() throws LWJGLException; + private static native void closeDisplay(); public void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException { lockAWT(); |