Thread: [sdljava-users] sdljava-0.9.1 released!
Status: Beta
Brought to you by:
ivan_ganza
From: Ivan Z. G. <iva...@ya...> - 2005-02-20 22:32:39
|
Greetings, I'm happy to announce the next release of sdljava - sdljava-0.9.1 sdljava is a java binding to the SDL API. This release includes many new features. The major changes were the removal of the dependency on JDK 1.5 and the addition of the OpenGL binding via GLEW (http://glew.sourceforge.net) and a binding to FTGL (http://homepages.paradise.net.nz/henryj/code/#FTGL). Also a new developer has joined the team: Bart LEBEOUF bartleboeuf at yahoo.fr. Bart has helped create the build environments on the windows side as well many additions in various places in the codebase. I hope you find this useful. Please send any questions to the mailing list. -Ivan/ ------------------------------ Changes: * added jniclasscode pragma's to swig interface (.i) files which cal= l System.loadLibrary for the appropriate lib. Now there is no need t= o call System.loadLibrary explictly from code which utilizes sdljava =20 * added new methods to SDLMixer (SDLMixer version requirement is stil= l 1.2.5) public static MixChunk loadWAV(Buffer buf) throws SDLException public static MixChunk loadWAV(byte[] data) throws SDLException public static MixChunk loadWAV(URL url) throws SDLException,=20 IOException, MalformedURLException public static MixChunk loadWAV(InputStream in) throws=20 SDLException, IOException =20 public static MixMusic loadMUS(Buffer buf) throws SDLException { public static MixMusic loadMUS(byte[] data) throws SDLException public static MixMusic loadMUS(URL url) throws SDLException,=20 IOException, MalformedURLException public static MixMusic loadMUS(InputStream in) throws=20 SDLException, IOException =20 * added new methods to SDLImage public static SDLSurface load(Buffer buf) throws SDLException public static SDLSurface load(byte[] data) throws SDLException public static SDLSurface load(URL url) throws SDLException,=20 IOException, MalformedURLException public static SDLSurface load(InputStream in ) throws=20 SDLException, IOException =20 * JDK 1.5 enumerations removed. Any existing code which used these enumerations needs to be slightly modified. Please see tests for examples of how to use. =20 * CDStatus.java is no longer a JDK 1.5 enumeration * SDLGrabMode.java is no longer a JDK 1.5 enumeration * SDLAppState.java is no longer a JDK 1.5 enumeration * SDLEventAction.java is no longer a JDK 1.5 enumeration * SDLEventState.java is no longer a JDK 1.5 enumeration * SDLKey.java is no longer a JDK 1.5 enumeration * SDLEvent.java method eventState now takes an int for the event type method getKeyName now takes an int method getType now returns an int =20 * ALL JDK 1.5 dependencies removed. JDK 1.5 is no longer required!! =20 * OpenGL 1.1 Support added!!! * new methods on SDLSurface getGL() and glSwapBuffers() to access =20 * BufferUtil.java changed readInputStream() so that when it created the ByteBuffer to ordering is set to the native byte order. =20 * SDLSurface added mustLock() method =20 * BufferUtil.java: integrated patch from Robert Schuster <theBohemian at gmx.net> which fixed the problem of loading byte streams from URLs over the network. Thanks Robert! =20 * SDLSurface added ByteBuffer getPixelData() method which returns direct byte buffer for pixel data access! Removed get/setPixelDataXXXX() methods =20 * FTGL binding added=20 (http://homepages.paradise.net.nz/henryj/code/#FTGL). =20 Font support is now available for OpenGL binding. Check out=20 FTGLTest example code. =20 * Moved gljava and ftgl build to src/org/gljava/opengl/native directo= ry =20 * Added ability to disable automatic loading of shared library. Specify -Dsdljava.bootclasspath=3Dtrue (or any value) to the java v= m and no shared libraries will be loaded. =20 Thanks to St=E9phane Meslin-Weber <steph at tangency.co.uk> for the suggestions. =20 * added org.gljava.opengl.model package to faciliate dealing with 3D model data. Also added gljava_export.py blender export script whic= h exports xml format file which can be imported by XMLModelLoader in same pacakge. (there is much to be done here stil...) =20 * added DebugGL for debug pipeline support. Please see source file for documentatin. =20 * Changed methods in SDLGfx which took short[] to take ShortBuffer instances instead. Note: these methods are currently not working. =20 * added version API; SDLMain.getSDLVersion(),=20 SDLMixer.getMixVersion(), SDLTTF.getTTFVersion() ------------------------------ Required/Recommended Libraries: (higher version should be fine) - Java 1.4 - SDL 1.2.7 =20 - GLEW 1.3.1 (http://glew.sourceforge.net) for OpenGL Support (option= al) - FTGL 2.1.3 (http://homepages.paradise.net.nz/henryj/code/#FTGL)=20 for FreeType font Support w/OpenGL (optional) =20 - SDL_image 1.2.3 (optional) - SDL_mixer 1.2.5 (optional) - SDL_ttf 2.0.6 (optional) - SDL_gfx 2.0.13 (optional) =20 - Ant 1.6.2 (optional, only if you need want to compile java sources) - SWIG 1.3.22 (optional, only if you want to re-generate native layer) - Ruby 1.8.2 (optional, only if you want to re-generate SOME of native layer) |
From: Chris D. <Des...@nt...> - 2005-02-20 23:40:53
Attachments:
videomode.diff
|
Did the mailing list send out a message with the same name with the .diff attached? I'm not sure if everyone got it or not, since I've had no confirmation, and there have been mailing list messages since then. The changes I made in it are quite useful, since it allows you to store and use video modes, and it also cleans up some javadoc comments, so please merge it with CVS if there are no problems. Anyway, I'll re-attach it to this message. -- |>>> 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: Ivan Z. G. <iva...@ya...> - 2005-02-21 01:41:31
|
I haven't had a chance to thinking about anything except doing the release. This is on my list of things to do. Thanks, -Ivan/ Chris Dennett wrote: > Did the mailing list send out a message with the same name with the > .diff attached? I'm not sure if everyone got it or not, since I've had > no confirmation, and there have been mailing list messages since then. > > The changes I made in it are quite useful, since it allows you to > store and use video modes, and it also cleans up some javadoc > comments, so please merge it with CVS if there are no problems. > Anyway, I'll re-attach it to this message. > >------------------------------------------------------------------------ > >Index: SDLVideo.java >=================================================================== >RCS file: /cvsroot/sdljava/sdljava/src/sdljava/video/SDLVideo.java,v >retrieving revision 1.20 >diff -u -r1.20 SDLVideo.java >--- SDLVideo.java 25 Jan 2005 02:17:23 -0000 1.20 >+++ SDLVideo.java 20 Feb 2005 00:06:04 -0000 >@@ -25,7 +25,6 @@ > > import sdljava.SDLMain; > import sdljava.SDLException; >-import java.util.List; > import java.util.HashMap; > > /** >@@ -45,61 +44,51 @@ > { > /** > * Transparency definitions: These define alpha as the opacity of a surface >- * > */ > public static final int SDL_ALPHA_OPAQUE = SWIG_SDLVideoConstants.SDL_ALPHA_OPAQUE; > > /** > * Transparency definitions: These define alpha as the opacity of a surface >- * > */ > public static final int SDL_ALPHA_TRANSPARENT = SWIG_SDLVideoConstants.SDL_ALPHA_TRANSPARENT; > > /** > * Surface is stored in system memory >- * > */ > public static final long SDL_SWSURFACE = SWIG_SDLVideoConstants.SDL_SWSURFACE; > > /** > * Surface is stored in video memory >- * > */ > public static final long SDL_HWSURFACE = SWIG_SDLVideoConstants.SDL_HWSURFACE; > > /** > * Surface uses asynchronous blits if possible >- * > */ > public static final long SDL_ASYNCBLIT = SWIG_SDLVideoConstants.SDL_ASYNCBLIT; > > /** > * Allows any pixel-format (Display surface) >- * > */ > public static final long SDL_ANYFORMAT = SWIG_SDLVideoConstants.SDL_ANYFORMAT; > > /** > * Surface has exclusive palette >- * > */ > public static final long SDL_HWPALETTE = SWIG_SDLVideoConstants.SDL_HWPALETTE; > > /** > * Surface is double buffered (Display surface) >- * > */ > public static final long SDL_DOUBLEBUF = SWIG_SDLVideoConstants.SDL_DOUBLEBUF; > > /** > * Surface is full screen (Display Surface) >- * > */ > public static final long SDL_FULLSCREEN = SWIG_SDLVideoConstants.SDL_FULLSCREEN; > > /** > * Surface has an OpenGL context (Display Surface) >- * > */ > public static final long SDL_OPENGL = SWIG_SDLVideoConstants.SDL_OPENGL; > >@@ -107,74 +96,52 @@ > * Surface supports OpenGL blitting (Display Surface). NOTE: This > * option is kept for compatibility only, and is not recommended > * for new code. >- * > */ > public static final long SDL_OPENGLBLIT = SWIG_SDLVideoConstants.SDL_OPENGLBLIT; > > /** > * Surface is resizable (Display Surface) >- * > */ > public static final long SDL_RESIZABLE = SWIG_SDLVideoConstants.SDL_RESIZABLE; > > /** > * No window caption or edge frame >- * > */ > public static final long SDL_NOFRAME = SWIG_SDLVideoConstants.SDL_NOFRAME; > > /** > * Surface blit uses hardware acceleration >- * > */ > public static final long SDL_HWACCEL = SWIG_SDLVideoConstants.SDL_HWACCEL; > > /** > * Surface use colorkey blitting >- * > */ > public static final long SDL_SRCCOLORKEY = SWIG_SDLVideoConstants.SDL_SRCCOLORKEY; > > /** > * Colorkey blitting is accelerated with RLE >- * > */ > public static final long SDL_RLEACCEL = SWIG_SDLVideoConstants.SDL_RLEACCEL; > > /** > * Surface blit uses alpha blending >- * > */ > public static final long SDL_SRCALPHA = SWIG_SDLVideoConstants.SDL_SRCALPHA; > > /** > * Surface uses preallocated memory >- * > */ > public static final long SDL_PREALLOC = SWIG_SDLVideoConstants.SDL_PREALLOC; > >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- > /** Is the cursor visible? > * @see #showCursor(int) */ > public static final int SDL_QUERY = -1; >+ > /** Hide the cursor. > * @see #showCursor(int) */ > public static final int SDL_DISABLE = 0; >+ > /** Show the cursor > * @see #showCursor(int) */ > public static final int SDL_ENABLE = 1; >@@ -262,6 +229,25 @@ > public static int videoModeOK(int width, int height, int bpp, int flags) throws SDLException { > return SWIG_SDLVideo.SDL_VideoModeOK(width, height, bpp, flags); > } >+ >+ /** >+ * Same as the method in this class with the same name, but this gets the >+ * width, height, BPP, and flag values from the SDLScreenMode instance >+ * instead. >+ * >+ * @author <a href="Des...@nt...">Chris Dennett</a> >+ * @param videoMode The video mode to test >+ * @return Same as the method with the same name. >+ * @exception SDLException If an error occurs >+ */ >+ public static int videoModeOK(SDLVideoMode videoMode) throws SDLException { >+ return videoModeOK( >+ videoMode.getWidth(), >+ videoMode.getHeight(), >+ videoMode.getBpp(), >+ videoMode.getFlags() >+ ); >+ } > > /** > * Set up a video mode with the specified width, height and bits-per-pixel. >@@ -337,6 +323,25 @@ > > return new SDLSurface(surface); > } >+ >+ /** >+ * Same as the method in this class with the same name, but this gets the >+ * width, height, BPP, and flag values from the SDLScreenMode instance >+ * instead. >+ * >+ * @author <a href="Des...@nt...">Chris Dennett</a> >+ * @param videoMode The video mode to set >+ * @return The framebuffer surface >+ * @throws SDLException If an error occurs >+ */ >+ public static SDLSurface setVideoMode(SDLVideoMode videoMode) throws SDLException { >+ return setVideoMode( >+ videoMode.getWidth(), >+ videoMode.getHeight(), >+ videoMode.getBpp(), >+ videoMode.getFlags() >+ ); >+ } > > /** > * Set the gamma correction for each of the color channels. >@@ -362,9 +367,9 @@ > * > * You must pass in valid pointers to arrays of 256 16-bit quantities. > * Any of the pointers may be NULL to ignore that channel. >- * If the call succeeds, it will return 0. If the display driver or >- * hardware does not support gamma translation, or otherwise fails, >- * this function will return -1. >+ * >+ * @return The current values of the gamma translation tables. >+ * > * @exception SDLException If an error occurs > */ > public static GammaTable getGammaRamp() throws SDLException { >@@ -388,13 +393,11 @@ > * gamma value at that index, scaled to the output color precision. > * > * You may pass NULL for any of the channels to leave it unchanged. >- * If the call succeeds, it will return 0. If the display driver or >- * hardware does not support gamma translation, or otherwise fails, >- * this function will return -1. >+ * > * @param red an <code>int[]</code> value > * @param green an <code>int[]</code> value > * @param blue an <code>int[]</code> value >- * @return a <code>boolean</code> value >+ * > * @exception SDLException If an error occurs > */ > public static void setGammaRamp(int[] red, int[] green, int[] blue) throws SDLException { >@@ -545,7 +548,7 @@ > * the SDL_HWSURFACE flag set, and will be created in system memory instead. > * > * @param flags Flags for this surface >- * @param height Desired width >+ * @param width Desired width > * @param height Desired height > * @param depth Desidred depth (bits per pixel) > * @param rMask Red Mask >@@ -600,8 +603,7 @@ > > /** > * Load a surface from a BMP file located at path. >- * >- * @parm The filesystem path of the file with the image data in BMP format >+ * @param path The filesystem path of the file with the image data in BMP format > * @return the new surface > * @exception SDLException If an error occurs > */ >Index: SDLVideoMode.java >=================================================================== >RCS file: /cvsroot/sdljava/sdljava/src/sdljava/video/SDLVideoMode.java,v >retrieving revision 1.3 >diff -u -r1.3 SDLVideoMode.java >--- SDLVideoMode.java 24 Dec 2004 17:32:17 -0000 1.3 >+++ SDLVideoMode.java 20 Feb 2005 00:06:04 -0000 >@@ -24,7 +24,7 @@ > * Class to represent a possible SDL Video Mode (not part of SDL) > * > * >- * @author Ivan Z. Ganza >+ * @author Ivan Z. Ganza, <a href="mailto:Des...@nt...">Dessimat0r</a> > * @version $Id: SDLVideoMode.java,v 1.3 2004/12/24 17:32:17 ivan_ganza Exp $ > */ > public class SDLVideoMode { >@@ -32,40 +32,60 @@ > int height; > int bpp; > int flags; >+ >+ /** >+ * Creates a new SDLVideoMode object. >+ * @param width The width of the screen. >+ * @param height The height of the screen >+ * @param bpp The bits per pixel. >+ * @param flags The flags of the video mode. >+ */ >+ public SDLVideoMode(int width, int height, int bpp, int flags) { >+ this.width = width; >+ this.height = height; >+ this.bpp = bpp; >+ this.flags = flags; >+ } >+ >+ /** >+ * Creates a new SDLVideoMode object with no flags. >+ * @param width The width of the screen. >+ * @param height The height of the screen >+ * @param bpp The bits per pixel. >+ */ >+ public SDLVideoMode(int width, int height, int bpp) { >+ this(width, height, bpp, 0); >+ } > > /** >- * Gets the value of width >- * >- * @return the value of width >+ * The width of the screen >+ * @return The screen width > */ > public int getWidth() { >- return this.width; >+ return this.width; > } > > /** >- * Gets the value of height >- * >- * @return the value of height >+ * The height of the screen >+ * @return The screen height > */ > public int getHeight() { >- return this.height; >+ return this.height; > } > > /** >- * Gets the value of bpp >- * >- * @return the value of bpp >+ * The bits per pixel >+ * @return The bits per pixel > */ > public int getBpp() { >- return this.bpp; >+ return this.bpp; > } > > /** >- * Gets the value of flags >- * >- * @return the value of flags >+ * The flags of the video mode >+ * @return The flags of the video mode > */ > public int getFlags() { >- return this.flags; >+ return this.flags; > } > } // class VideoMode >\ No newline at end of file > > |