Sdl and java

Can you use sdl with java? does anyone know of any examples?_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

Can you use sdl with java? does anyone know of any examples?

Yep: http://jsdl.sourceforge.net/

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Can you use sdl with java? does anyone know of any examples?

This was my meager attempt at it:
http://cvs.icculus.org/horde/chora/cvs.php/last/toby/turtlespace/sdl?rt=toby_rewrite_3

It crashed a lot; not sure if my native code was buggy or JNI was
buggy…but I did get a surface and rendered some lines to the screen
before the crashes, so it CAN be done.

The basic gist:

public class MyJavaClass
{
static { System.loadLibrary(“MyNativeCodeLibrary”); }

 private static native void myNativeFunction();


 public static void main(String args[])
 {
      MyJavaClass x = new MyJavaClass();
      x.myNativeFunction();
 }

}

Look at the C file and the sh script for the voodoo you need to do to
build a shared library under Linux.

–ryan.

Yep: http://jsdl.sourceforge.net/

Or…you could use that. :slight_smile:

(Wow…that’s really cool!)

–ryan.

I have a project on sourceforge that you could use.

Features: OpenGL and GLU, sdl_ttf for true type font support, sdl_image
for image support.
Lacks: Sound support (still integrating sdl_mixer) ,examples, and good
documentation.

Its still in beta so use at your own risk.

JC Santiago wrote:> Can you use sdl with java? does anyone know of any examples?


Send and receive Hotmail on your mobile device: http://mobile.msn.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Meh, might consider using SDL_sound instead. Ryan and others promise that
it will not suck like SDL_mixer does. I wouldn’t try mixing sound in an
bytecode recompiler though, so you should either use an existing sound lib
or write your own mixing code in C. (I’m guessing I don’t need to tell
you that, but just in case…)

Actually, I wouldn’t do it for an OpenGL renderer either, but the fastest
renderers these days just process meshes and shaders with a little
optimisation for added speed. Provided you don’t keep the CPU twiddling
its transistors on preprocessing too much, you can approach the documented
limits of the hardware pretty easily. Most of us are just CPU limited at
that point, even with an AMD 2600. =pOn Thu, Aug 22, 2002 at 08:53:29AM -0500, Stanley E Brown wrote:

I have a project on sourceforge that you could use.

http://www.sourceforge.net/projects/sdl4java

Features: OpenGL and GLU, sdl_ttf for true type font support, sdl_image
for image support.
Lacks: Sound support (still integrating sdl_mixer) ,examples, and good
documentation.

Its still in beta so use at your own risk.

–
Joseph Carter Only l33t on Thursdays

“NT 5.0. All the bugs and ten times the code size!”

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020822/4816af61/attachment.pgp

Was thinking of an interface for my old AWT API.

Should just be able to hand over the window. Or exec the JRE as a process.
Waiting till I can actually compile and run SDL3 with my mingw64.

Replying to a 21-year-old thread!! Is this a record?

2 Likes