sdljava-users Mailing List for Java Binding for SDL (Page 13)
Status: Beta
Brought to you by:
ivan_ganza
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(43) |
Feb
(50) |
Mar
(44) |
Apr
(14) |
May
(18) |
Jun
(7) |
Jul
(26) |
Aug
(29) |
Sep
(28) |
Oct
(10) |
Nov
(5) |
Dec
(7) |
2006 |
Jan
(2) |
Feb
(9) |
Mar
(16) |
Apr
(1) |
May
(11) |
Jun
(8) |
Jul
(8) |
Aug
(5) |
Sep
(15) |
Oct
|
Nov
|
Dec
(2) |
2007 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(2) |
Jun
(4) |
Jul
(1) |
Aug
(14) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
2009 |
Jan
(1) |
Feb
(5) |
Mar
|
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
2016 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Rainer K. <ar...@gm...> - 2005-03-21 05:16:53
|
I've been checking my code over and over again for a bug (or rather undocumented feature?) which is actually in the native binding :/ This costed me hours and hours. Why isn't this documented? SDLBlitSurface doesn't behave as it should due to those changes below. int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, int sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, int dHeight) { srcBlitRect.x = (sX > -1 ? sX : 0); srcBlitRect.y = (sY > -1 ? sY : 0); srcBlitRect.w = (sWidth > -1 ? sWidth : 0); srcBlitRect.h = (sHeight > -1 ? sHeight : 0); dstBlitRect.x = (dX > -1 ? dX : 0); dstBlitRect.y = (dY > -1 ? dY : 0); dstBlitRect.w = (dWidth > -1 ? dWidth : 0); dstBlitRect.h = (dHeight > -1 ? dHeight: 0); return SDL_BlitSurface(src, &srcBlitRect, dst, &dstBlitRect); } Positions _CAN_ be negative. Otherwise how are you supposed to move a sprite or image outside of the screen if it is nailed to position 0? srcBlitRect.x = sX; srcBlitRect.y = sY; srcBlitRect.w = (sWidth > -1 ? sWidth : 0); srcBlitRect.h = (sHeight > -1 ? sHeight : 0); dstBlitRect.x = dX; dstBlitRect.y = dY; dstBlitRect.w = (dWidth > -1 ? dWidth : 0); dstBlitRect.h = (dHeight > -1 ? dHeight: 0); Rainer |
From: Rainer K. <ar...@gm...> - 2005-03-20 20:43:49
|
> Hello all, > I've tweaked the Makefile (it's in attach) to build JNI libraries under > OSX, (I started building SDL from sources, with binary frameworks it's > something similar) but when I try the video test I take > > > dottie:~/works/sdljava-0.9.1 gpciceri$ java -Djava.library.path=./lib > -cp ./classes/ sdljava.video.SDLVideoTest > Video subsystem initialized > 2005-03-20 18:20:50.004 java[21213] *** _NSAutoreleaseNoPool(): Object > 0x313f50 of class NSCFArray autoreleased with no pool in place - just > leaking > ... The problem is that MacOS (or rather Cocoa) seems to use pools for memory handling and that you have to initialize the pools in your application. I am not a MacOS developer, but I also tried getting SDLJava to run. In the SDLMain() method for SDL on MacOS this seems to be done, but since SDLJava doesn't use the main method it would have to be added to the wrapper code. And to my knowledge this pool would have to be created for _every_ thread which uses SDL. I made the necessary changes only to run into further problems. The test applications would start and then throw a SDL parachute exploded message after a few seconds so I guess that it needs more tweaking than that :) Anyway, if you want to play with this, here is what I changed: SDLMain_Wrap.c: JNIEXPORT jint JNICALL Java_sdljava_x_swig_SWIG_1SDLMainJNI_SDL_1Init(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; Uint32 arg1 ; int result; NSApplicationLoad(); // Init Cocoa (void)jenv; (void)jcls; arg1 = (Uint32)jarg1; result = (int)SDL_Init(arg1); jresult = (jint)result; return jresult; } SDLMain.java import com.apple.cocoa.foundation.*; public class SDLMain { private static int m_nMyPool; ... public static void init(long flags) throws SDLException { m_nMyPool = NSAutoreleasePool.push(); int result = SWIG_SDLMain.SDL_Init(flags); if (result == -1) { throw new SDLException(getError()); } start_time = System.currentTimeMillis(); } ... public static void quit() { SWIG_SDLMain.SDL_Quit(); NSAutoreleasePool.pop(m_nMyPool); } ... } Good luck :D Rainer -- "Happy ProMail" bis 24. März: http://www.gmx.net/de/go/promail Zum 6. Geburtstag gibt's GMX ProMail jetzt 66 Tage kostenlos! |
From: gian p. c. <gp....@ac...> - 2005-03-20 17:27:57
|
Hello all, I've tweaked the Makefile (it's in attach) to build JNI libraries under OSX, (I started building SDL from sources, with binary frameworks it's something similar) but when I try the video test I take dottie:~/works/sdljava-0.9.1 gpciceri$ java -Djava.library.path=./lib -cp ./classes/ sdljava.video.SDLVideoTest Video subsystem initialized 2005-03-20 18:20:50.004 java[21213] *** _NSAutoreleaseNoPool(): Object 0x313f50 of class NSCFArray autoreleased with no pool in place - just leaking ... 2005-03-20 18:20:50.209 java[21213] *** _NSAutoreleaseNoPool(): Object 0x341930 of class NSException autoreleased with no pool in place - just leaking 2005-03-20 18:20:50.211 java[21213] *** Uncaught exception: <NSInternalInconsistencyException> Error (1002) creating CGSWindow Trace/BPT trap I've googled a little, and it seems that it's a standard issue when you don't call SDLmain() under OSX to initialize SDL - but at present I cannot say where to change the sdljava interface to be sure to have cocoa environment initialized. If anyone out there is able to help, it will be appreciated. Regards /gp BTW, my sdl-config says dottie:~/works/sdljava-0.9.1 gpciceri$ sdl-config --cflags --libs -I/usr/local/include/SDL -D_THREAD_SAFE -L/usr/local/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL -- Gian Paolo Ciceri Via G.Marconi 5 - 22036 ERBA CO ITALY mobile : ++39 340 7218101 eMail : gp....@ac..., : gp....@su... webSite: http://www.suddenthinks.com ICQ # : 94620118 jabber : gp....@ja... |
From: Ivan Z. G. <iva...@ya...> - 2005-03-20 16:26:43
|
HI Jean, Its a good question and I'm not completely sure as to the answer. I don't believe that fullscreen mode was intended to support having 'other' windows pop up over it. The behavior when this happens is probably undefined and will probably be different for each OS, window env... -Ivan/ Jean Fortin wrote: > Hi, > My program uses sdljava in fullscreen mode, and I'd like to open a > swing window over the sdl window. > But when I do this, the title bar of the sdl window becomes visible. > Is there a way to avoid this behaviour? > > Thanks in advance, > Jean Fortin > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Ivan Z. G. <iva...@ya...> - 2005-03-20 16:24:55
|
Hi Fredrik, I would love to get sdljava working with Max OS X. I can't offer to much aid at the moment however because I don't have access to an OS X machine. There might be some special stuff you have to do to have it work under Eclipse. Check the list archives. I know people have gotten it to work under Eclipse but I think they had to explicitly specify the path to the shared libraries. I've added a VM switch to allow this. Having all the classes in the jarfile should be fine. Unless you actually reference image or gfx then the VM won't attempt to load those shared libraries. The System.loadLibrary() call is only made if the class is actually loaded by the runtime which won't happen unless its referenced by come other class. Would really appreciate it if someone can get this working on OS X. Please post the appropriate Makefile, documentation, etc... that are needed to make it work and I'll include it in the next release. If someone is willing to build me binaries for OSX before a release I can include those for the public. -Ivan/ Fredrik Olsson wrote: > Hi. > > I have tried to compile sdljava for Mac OS X, the Makefile does not > work as -shared is not used on gcc for Darwin (-dynamic should be used > to linker instead). To work around that I instead created a dummy > XCode project and successfully compiled libsdljava.dylib (Default > extension is .dylib not .so). > > Using ant I have compiled sdljava.jar as the INSTALL text file > documents, and included it in my project in Eclipse. When starting the > application it says that libsdljava can not be found in path. I have > tried to rename .dylib to .so and put it in different paths (., > /usr/lib and /usr/lib/java/). > > I have linked against the lib from another C application to confirm > that it works so far. > > The jar still includes classes for image and gfx that I have not > compiled native libraries for, I guess that could be the problem. If > that is the problem how do I compile the jar with only selected classes? > > I am quite new to Java and very new to JNI so any help is appreciated. > Pre-compiled binaries would be best :). But a crash course is also > very welcome (Always good to know what it is you are doing). > > regards > Fredrik Olsson > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Fredrik O. <pe...@at...> - 2005-03-20 14:59:01
|
Hi. I have tried to compile sdljava for Mac OS X, the Makefile does not work as -shared is not used on gcc for Darwin (-dynamic should be used to linker instead). To work around that I instead created a dummy XCode project and successfully compiled libsdljava.dylib (Default extension is .dylib not .so). Using ant I have compiled sdljava.jar as the INSTALL text file documents, and included it in my project in Eclipse. When starting the application it says that libsdljava can not be found in path. I have tried to rename .dylib to .so and put it in different paths (., /usr/lib and /usr/lib/java/). I have linked against the lib from another C application to confirm that it works so far. The jar still includes classes for image and gfx that I have not compiled native libraries for, I guess that could be the problem. If that is the problem how do I compile the jar with only selected classes? I am quite new to Java and very new to JNI so any help is appreciated. Pre-compiled binaries would be best :). But a crash course is also very welcome (Always good to know what it is you are doing). regards Fredrik Olsson |
From: Jean F. <jea...@en...> - 2005-03-19 14:57:37
|
Hi, My program uses sdljava in fullscreen mode, and I'd like to open a swing window over the sdl window. But when I do this, the title bar of the sdl window becomes visible. Is there a way to avoid this behaviour? Thanks in advance, Jean Fortin |
From: Chris D. <Des...@nt...> - 2005-03-18 22:56:52
|
Hi everybody ;) The attached patch fixes a minor bug in SDLRect regarding the use of SDLPoint, introduces scaling and descaling methods in SDLRect. Also cleans up a lot of Javadoc comments which took me a while to do, including spelling mistakes and anomalies. The scaling and descaling stuff is especially useful for me, since I have a grid, with grid objects on that grid, and the grid rect is stored in a field within each grid object. When a grid object is created, I have to generate the grid rect by scaling the surface height and width down using the grid point size. This might make things easier for me and other people to do such things later on. There are also the getRect() methods in SDLSurface which have proven their use time and time again in pygame. This allows you to create a new SDLRect which has the height and width of the surface, and x = 0, y = 0, or the same but with a user-defined x and y, or the same but using an SDLPoint to specify the topleft point. Anyway, I hope you find these changes useful ;) Regards, Chris -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Rainer K. <ar...@gm...> - 2005-03-10 03:05:18
|
Ivan Z. Ganza wrote: > It wouldn't be too difficult, just a bunch of work to add the support > for GLU. Would you find this usefull right now? If so I will work on > adding this soon. > > Once you have the GL context created then I think you should be able to > make GL calls in whatever way you wish from whatever API. I'm not sure > about jogl but I doubt it. jogl would want its own GL instance which > makes no sense in the world of sdljava. > > -Ivan/ > Well, I saw that sdljava's GL instance was not really created by or obtained from SDL either since you create a glew instance so I am not sure how SDL / OpenGL are currently connected. glew has no direct GLU support I guess? I am trying to port GUIChan (a C++ GUI Toolkit) to Java. It has support for Allegro, SDL & OpenGL so I am also porting the OpenGL/SDL demo applications to make sure that my port is working correctly. Their OpenGL fpsdemo needs GLU so I was wondering how difficult it would be to get a binding. It is not urgent, I was just wondering. Cheers, Rainer > Rainer Koschnick wrote: > >> Hello, >> >> how difficult would it be to add GLU support to the gljava subproject? >> Could I use native bindings to the glu32 library and combine those >> with the glew wrapper? Would it work a GL object returned by glew? >> >> Or would it be possible to use jogl instead together with sdljava? >> Did anyone try this? >> >> Cheers, >> Rainer |
From: Ivan Z. G. <iva...@ya...> - 2005-03-10 01:44:54
|
It wouldn't be too difficult, just a bunch of work to add the support for GLU. Would you find this usefull right now? If so I will work on adding this soon. Once you have the GL context created then I think you should be able to make GL calls in whatever way you wish from whatever API. I'm not sure about jogl but I doubt it. jogl would want its own GL instance which makes no sense in the world of sdljava. -Ivan/ Rainer Koschnick wrote: > Hello, > > how difficult would it be to add GLU support to the gljava subproject? > Could I use native bindings to the glu32 library and combine those > with the glew wrapper? Would it work a GL object returned by glew? > > Or would it be possible to use jogl instead together with sdljava? > Did anyone try this? > > Cheers, > Rainer > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Rainer K. <ar...@gm...> - 2005-03-10 01:34:43
|
Hello, how difficult would it be to add GLU support to the gljava subproject? Could I use native bindings to the glu32 library and combine those with the glew wrapper? Would it work a GL object returned by glew? Or would it be possible to use jogl instead together with sdljava? Did anyone try this? Cheers, Rainer |
From: Ivan Z. G. <iva...@ya...> - 2005-03-08 23:32:55
|
Hi Robert, Hope your doing well. sdljava links dynamically against shared libraries. The link fully supports dropping in any shared library (or dll on windows). The problem however is that between those two versions of SDL_gfx (.12 to .13) there were some changes to the actual function prototypes so the symbols in the .12 don't match whats in the .13. Not much we can do about that... -Ivan/ Robert Schuster wrote: > Ok, > my fault ... this time. The libdirectfb dependency came from SDL > itself which I had to recompile. > > However the problem remains for sdljava's SDL_gfx binding which is (in > the binary distribution) linked against libSDL_gfx.so.13 which is not > available on my system (I have libSDL_gfx.so.12). Isnt it possible to > link against libSDL_gfx.so instead? > > cu > Robert > > > Robert Schuster wrote: > >> Hi, >> after an upgrade from libdirectfb-0.9.so.20 to 0.9.so.21 my SDLJava >> powered Java apps fail with this exception: >> >> java.lang.UnsatisfiedLinkError: >> /home/rob/workspace/freefodder/FFMKI/lib/native/linux-i386/libsdljava.so: >> libdirectfb-0.9.so.20: cannot open shared object file: No such file >> or directory >> >> Recompiling the sdljava's libraries solved the problem tentatively >> but I had a /usr/lib/libdirectfb.so (a symlink) on my system before >> and after the upgrade of directfb and it would be nice if >> libsdljava.so would be linked against this file instead. >> >> Without a change to this distributing a sdljava-based game via JNLP >> is pointless because I cannot control which minor version of sdl and >> directfb libraries are installed on the client machines (at least >> when I ship it with sdljava's JNI libraries) >> >> Any linker experts here? >> >> cu >> Robert >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> sdljava-users mailing list >> sdl...@li... >> https://lists.sourceforge.net/lists/listinfo/sdljava-users >> >> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Robert S. <the...@gm...> - 2005-03-08 15:37:12
|
Ok, my fault ... this time. The libdirectfb dependency came from SDL itself which I had to recompile. However the problem remains for sdljava's SDL_gfx binding which is (in the binary distribution) linked against libSDL_gfx.so.13 which is not available on my system (I have libSDL_gfx.so.12). Isnt it possible to link against libSDL_gfx.so instead? cu Robert Robert Schuster wrote: > Hi, > after an upgrade from libdirectfb-0.9.so.20 to 0.9.so.21 my SDLJava > powered Java apps fail with this exception: > > java.lang.UnsatisfiedLinkError: > /home/rob/workspace/freefodder/FFMKI/lib/native/linux-i386/libsdljava.so: > libdirectfb-0.9.so.20: cannot open shared object file: No such file or > directory > > Recompiling the sdljava's libraries solved the problem tentatively but > I had a /usr/lib/libdirectfb.so (a symlink) on my system before and > after the upgrade of directfb and it would be nice if libsdljava.so > would be linked against this file instead. > > Without a change to this distributing a sdljava-based game via JNLP is > pointless because I cannot control which minor version of sdl and > directfb libraries are installed on the client machines (at least when > I ship it with sdljava's JNI libraries) > > Any linker experts here? > > cu > Robert > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users > > |
From: Robert S. <the...@gm...> - 2005-03-08 15:12:32
|
Hi, after an upgrade from libdirectfb-0.9.so.20 to 0.9.so.21 my SDLJava powered Java apps fail with this exception: java.lang.UnsatisfiedLinkError: /home/rob/workspace/freefodder/FFMKI/lib/native/linux-i386/libsdljava.so: libdirectfb-0.9.so.20: cannot open shared object file: No such file or directory Recompiling the sdljava's libraries solved the problem tentatively but I had a /usr/lib/libdirectfb.so (a symlink) on my system before and after the upgrade of directfb and it would be nice if libsdljava.so would be linked against this file instead. Without a change to this distributing a sdljava-based game via JNLP is pointless because I cannot control which minor version of sdl and directfb libraries are installed on the client machines (at least when I ship it with sdljava's JNI libraries) Any linker experts here? cu Robert |
From: Rainer K. <ar...@gm...> - 2005-03-06 23:48:17
|
Chris Dennett wrote: > I've posted up the working SDL_gfx.dll if anyone wants it -- the zip is > only 25KB. ;) Thanks to Sannie for sending it to me. > > http://codeknight.net/Other/SDLJava/SDL_gfx.zip Ok, I figured that putting it in lib/ alone doesn't fix the problem since Windows will load the version from C:\Windows\system32. Trying to port guichan to Java here so I need SDL_gfx ;) Cheers, Rainer |
From: Ivan Z. G. <iva...@ya...> - 2005-03-06 23:41:30
|
Hello Rainer, Hmmm, is this is with the release version of DLL? The binary download or your buidling it yourself? -Ivan/ Rainer Koschnick wrote: > Hello, > > I cannot use the SDL_gfx binding here, I am getting this error message > when I try to run the included testgfx app: > > Native code library failed to load. > java.lang.UnsatisfiedLinkError: .\lib\SDLJava_gfx > .dll: A dynamic link library (DLL) initialization routine failed > > I tried building my own version of SDL_gfx 2.0.13 which doesn't work > either. The other bindings seem to work fine. > > Cheers, > Rainer > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Chris D. <Des...@nt...> - 2005-03-06 22:38:51
|
I've posted up the working SDL_gfx.dll if anyone wants it -- the zip is only 25KB. ;) Thanks to Sannie for sending it to me. http://codeknight.net/Other/SDLJava/SDL_gfx.zip Regards, Chris -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Chris D. <Des...@nt...> - 2005-03-06 22:18:03
|
Sannie Kwakman wrote: > > Chris Dennett wrote: > >> Rainer Koschnick wrote: >> >>> Hello, >>> >>> I cannot use the SDL_gfx binding here, I am getting this error message >>> when I try to run the included testgfx app: >>> >>> Native code library failed to load. >>> java.lang.UnsatisfiedLinkError: .\lib\SDLJava_gfx >>> .dll: A dynamic link library (DLL) initialization routine failed >>> >>> I tried building my own version of SDL_gfx 2.0.13 which doesn't work >>> either. The other bindings seem to work fine. >> >> >> >> I have problems with SDL_gfx as well (including when building it). If >> you work out how to fix it, please tell us ;) >> > I've managed to build SDL_gfx successfully on the first try using > mingw (with a little help from > http://www.libsdl.org/extras/win32/mingw32/README.txt). If you want I > can send you the resulting SDL_gfx.dll file via email. > > -- Sannie Please send or post somewhere! I don't want to install mingw32 at all -- the reason why we code in Java is to avoid the obfuscation of C and C++ ;) Regards, Chris -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Sannie K. <sa...@in...> - 2005-03-06 21:33:40
|
Chris Dennett wrote: > Rainer Koschnick wrote: > >> Hello, >> >> I cannot use the SDL_gfx binding here, I am getting this error message >> when I try to run the included testgfx app: >> >> Native code library failed to load. >> java.lang.UnsatisfiedLinkError: .\lib\SDLJava_gfx >> .dll: A dynamic link library (DLL) initialization routine failed >> >> I tried building my own version of SDL_gfx 2.0.13 which doesn't work >> either. The other bindings seem to work fine. > > > I have problems with SDL_gfx as well (including when building it). If > you work out how to fix it, please tell us ;) > I've managed to build SDL_gfx successfully on the first try using mingw (with a little help from http://www.libsdl.org/extras/win32/mingw32/README.txt). If you want I can send you the resulting SDL_gfx.dll file via email. -- Sannie |
From: Chris D. <Des...@nt...> - 2005-03-06 21:15:30
|
Rainer Koschnick wrote: > Hello, > > I cannot use the SDL_gfx binding here, I am getting this error message > when I try to run the included testgfx app: > > Native code library failed to load. > java.lang.UnsatisfiedLinkError: .\lib\SDLJava_gfx > .dll: A dynamic link library (DLL) initialization routine failed > > I tried building my own version of SDL_gfx 2.0.13 which doesn't work > either. The other bindings seem to work fine. I have problems with SDL_gfx as well (including when building it). If you work out how to fix it, please tell us ;) -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Rainer K. <rai...@eb...> - 2005-03-06 20:35:44
|
Hello, I cannot use the SDL_gfx binding here, I am getting this error message when I try to run the included testgfx app: Native code library failed to load. java.lang.UnsatisfiedLinkError: .\lib\SDLJava_gfx .dll: A dynamic link library (DLL) initialization routine failed I tried building my own version of SDL_gfx 2.0.13 which doesn't work either. The other bindings seem to work fine. Cheers, Rainer |
From: Ivan Z. G. <iva...@ya...> - 2005-03-06 01:21:13
|
Thanks for this info. Once I get a FAQ going I'll be certain to mention it there. This is making me think that inside SDLMixer we might want to keep a reference to whatever is being played until its finished playing. Once you say playMusic and pass in the song we shouldn't allow the garbage collector to scoop it up. I think this could happen once the callbacks are implemented. Any suggestions appreciated... -Ivan/ Robert Schuster wrote: > Hi list, > I was writing on a small demo app which at some place included these > lines: > > if (!measureFPS) { > SDLMixer.openAudio(44100, SDLMixer.AUDIO_S16SYS, 2, 2048); > > System.out.println("Loading song."); > > MixMusic song = SDLMixer.loadMUS(Thread.currentThread() > .getContextClassLoader() > .getResourceAsStream("memesong.ogg")); > > System.out.println("Playing song: " + song); > SDLMixer.playMusic(song, 0); > } > > The code does not look very special but at runtime something odd will > happen: You will hear a small bit of music and then it stops. The > reason for this is that the MixMusic instance 'song' gets garbage > collected when the if-block ends. I describe this here because this > behavior is caused by the way Swig handles native pointers and can be > a pitfall for others as it was for me. > > You can work around this problem by assigning an instance like > MixMusic (which in the above example is a local variable) to an > instance or class variable. > > @Ivan: If you are going to write a FAQ for SDLJava sometime it would > be good to add this issue to it. > > cu > Robert > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Chris D. <Des...@nt...> - 2005-03-05 17:02:56
|
I've created a new patch file that has improvements to SDLRect, and introduces SDLPoint. SDLRect no longer extends SDLPoint, nor does it use it for any fields, but this may be implemented in the future. If you want me to edit anything if you can't commit it for some reason, just tell me, or do it yourself if the changes are minor, but I think everything is in order. These changes only took me around an hour to implement using the existing modified source which could not be checked in. Changelog: * SDLRect * Allows you to create a new SDLRect with the x and y in SDLPoint as the topleft point, and with integer height and width. * Now has getLocation(), getCenter(), getTopRight(), getBottomLeft(), getBottomRight(), setLocation(SDLPoint), setCenter(SDLPoint), setCenter(int, int). * Can now be cloned using clone() method, implemented using standard coding practice. * More intuitive JavaDoc comments. * SDLPoint * Brand new class, allows you to reference a 2D point that has an X and Y coordinate. The patch file for these changes is attached. By the way, I see that the other SDLJava files have an odd @version JavaDoc string -- how did you implement this? Is it automatic? p.s. Mozilla Thunderbird is doing my head in with its whacky indentation ;) Regards, Chris -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Robert S. <the...@gm...> - 2005-03-03 19:55:35
|
Hi list, I was writing on a small demo app which at some place included these lines: if (!measureFPS) { SDLMixer.openAudio(44100, SDLMixer.AUDIO_S16SYS, 2, 2048); System.out.println("Loading song."); MixMusic song = SDLMixer.loadMUS(Thread.currentThread() .getContextClassLoader() .getResourceAsStream("memesong.ogg")); System.out.println("Playing song: " + song); SDLMixer.playMusic(song, 0); } The code does not look very special but at runtime something odd will happen: You will hear a small bit of music and then it stops. The reason for this is that the MixMusic instance 'song' gets garbage collected when the if-block ends. I describe this here because this behavior is caused by the way Swig handles native pointers and can be a pitfall for others as it was for me. You can work around this problem by assigning an instance like MixMusic (which in the above example is a local variable) to an instance or class variable. @Ivan: If you are going to write a FAQ for SDLJava sometime it would be good to add this issue to it. cu Robert |
From: Robert S. <the...@gm...> - 2005-03-02 02:21:47
|
Hi Luis, SDLJava runs fine with Free VMs based on GNU Classpath 0.14 (released on 2.24.05 but the important patch was committed earlier). For GCJ try a snapshot from february. (I'll try the native compilation feature soon.) If you can live with interpreted Java bytecode try JamVM (>1.2.4) for now. The SableVM team recently released version 1.1.10 of their VM which is said to have support for certain functions needed to get SDLJava to run. If you try it please let me know about your results. If you want to use textures in OpenGL you might need to use an external image processing library (e.g. JIU). However I am not used to SDL. There may be a way to use SDLJava's SDLSurface objects as textures. If so it will work for all the above VMs. Finally if you got something to work (or not): Please write to this list. I am from GNU Classpath and can certainly help with some problems. cu Robert Luis Montes wrote: > Hey guys, > > Glad to see this project picked up again. > > Anyone tried using these bindings with gcj ? > > Seems like it would be a really cool way to have a 100% open source > gaming library in java with this. > > Luis > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users > > |