! sdl4gcj

!! System Requirement

* SDL v1.2.0 or newer - http://www.libsdl.org/ 
* SDL_mixer v1.2.0 or newer - http://www.libsdl.org/projects/SDL_mixer/
* SDL_image v1.2.0 or newer - http://www.libsdl.org/projects/SDL_image/


!! Installation

 % ./configure 
 % make 
 $ make install

Following files are installed.

 $(prefix)/lib/libsdl4gcj.a
 $(prefix)/lib/libsdl4gcj-mixer.a
 $(prefix)/lib/libsdl4gcj-image.a
 $(prefix)/share/java/ext/sdl4gcj.jar
 $(prefix)/share/java/ext/sdl4gcj-mixer.jar
 $(prefix)/share/java/ext/sdl4gcj-image.jar
 $(prefix)/include/sdl4gcj/**/*.h

!! Usage

!!! Write SimpleSDLApp.java using sdl4gcj API

 //////////////////////////////////////////////////////////// 
 import sdl4gcj.*;
 import sdl4gcj.video.*;
 
 public class SimpleSDLApp implements SDLConstants
 {
 	public static void main(String[] args)
 	{
 		SDLSystem.init(SDL_INIT_VIDEO);
 		Screen screen = Screen.setVideoMode(640, 480, 16, SDL_SWSURFACE);
 		screen.fillRect(screen.mapRGB(0xff, 0x00, 0x00));
 		screen.updateRect();
 		SDLSystem.delay(5000);
		SDLSystem.quit();
 	}
 }
 //////////////////////////////////////////////////////////// 

!!! Compile Your SDL Application

 % gcj --main=SimpleSDLApp -o SimpleSDLApp SimpleSDLApp.java \
 	--extdirs=$(prefix)/share/java/ext -L/$(prefix)/lib -lsdl4gcj \
 	`sdl-config --cflags --libs`

!! Examples

See test*/*.java.


!! OpenGL 

If you want to use OpenGL API for graphics rendering , 
See gl4gcj ( https://sourceforge.jp/projects/gl4gcj/ ) project.


