LWJGL 2.0 Beta 1 released

Started by Matzon, April 20, 2008, 20:52:02

Previous topic - Next topic

ScratchBoom

What is the most appropriate way to load textures without DevIL?
Should I use java ImageIO API?

kappa

the recommended replacement for both Devil and Fmod in lwjgl 2.0 is "slick-util" it can be found at http://slick.cokeandcode.com/downloads/util/
with javadoc being at http://slick.cokeandcode.com/javadoc-util/

elias4444

I think I found a bug.

On my Mac, Keyboard.KEY_TAB doesn't seem to be mapped properly.
This code:
if (Keyboard.isKeyDown(Keyboard.KEY_TAB) || mapisover) {
			drawScores();
		}

Returns false no matter what. I tried changing the key to something else, and then it worked.

Update:  Looks like TAB doesn't return anything at all. It's like a dead key according to LWJGL.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

Matzon

@ Tab bug, confirming - used to work

paulscode

I'm having some trouble with the lzma stuff in the 2.0b1 version of appletloader.

The Java Console shows:

Opening connection to: http://www.paulscode.com/source/SoundManager/13APR2008/Helicopter.jar
Opening connection to: http://www.paulscode.com/source/jpct/jpct.jar
Opening connection to: http://www.paulscode.com/source/lwjgl/JARs/lwjgl.jar.pack.lzma
Fatal error occured (4): Could not verify signing in resource: http://www.paulscode.com/source/lwjgl/JARs/lwjgl.jar.pack.lzma


Here is the html I am using:
<applet code="org.lwjgl.util.applet.AppletLoader"
	archive="http://www.paulscode.com/source/lwjgl/JARs/lwjgl_util_applet.jar,
		http://www.paulscode.com/source/lwjgl/JARs/lzma.jar"
	codebase="." width="640" height="480">

	<param name="al_title" value="Helicopter">
	<param name="al_main" value="Helicopter">
	<param name="al_logo" value="http://www.paulscode.com/source/lwjgl/paulscodelogo.png">
	<param name="al_progressbar" value="http://www.paulscode.com/source/lwjgl/paulscodeprogress.gif">
	<param name="al_jars"
		value="http://www.paulscode.com/source/SoundManager/13APR2008/Helicopter.jar,
			http://www.paulscode.com/source/jpct/jpct.jar,
			http://www.paulscode.com/source/lwjgl/JARs/lwjgl.jar.pack.lzma,
			http://www.paulscode.com/source/lwjgl/JARs/jinput.jar.pack.lzma,
			http://www.paulscode.com/source/lwjgl/JARs/lwjgl_util.jar.pack.lzma,
			http://www.paulscode.com/source/lwjgl/JARs/res.jar.lzma">
	<param name="al_windows" value="http://www.paulscode.com/source/lwjgl/JARs/windows_natives.jar.lzma">
	<param name="al_linux" value="http://www.paulscode.com/source/lwjgl/JARs/linux_natives.jar.lzma">
	<param name="al_mac" value="http://www.paulscode.com/source/lwjgl/JARs/macosx_natives.jar.lzma">
    
	<param name="al_version" value="0.4">
</applet>


The lzma files I am using are the ones distributed in lwjgl_applet-2.0b1.zip.  Anyone know what might be causing this problem?

Matzon

this may be related to is because of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6697988
try adding a .htaccess file or similar

paulscode

Quote from: Matzon on May 17, 2008, 11:40:57
this may be related to is because of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6697988
try adding a .htaccess file or similar

Yep, that fixed it.  Here is a more detailed explanation on how to fix the problem, for anoyone else who's a noob like me  ;D

1) Create a text file named ".htaccess".
If you are running Windows, it will complain, because that is not a valid filename, according to Bill.  You'll have to name it something like ".htaccess.txt", then rename it later after uploading it.

2) Edit the file you created, with notepad or other text editor.  Add the line:
AddType application/x-lzma .lzma

3) Save your file, and FTP it to wherever lwjgl_util_applet.jar and lzma.jar are located.  If necessary, rename your file ".htaccess" (remove the ".txt" extension)
Make sure you are allowed to use .htaccess before doing this!  Some of the things that .htaccess is able to do can compromise a server configuration.  For this reason, some web hosting companies may require them to be set up by an admin, so don't get in trouble.  You should CHMOD your .htaccess file to 644 (RW-R--R--) to prevent people from messing with it

That's it.  Thanks for the help, BTW!  My only suggestions would be to have a document related to the fix, included in the appletloader bundle.  Also, the plain old JAR's should be included, not just the LZMA's, just in case some users are not allowed to use .htaccess files -- at least until the Java bug is fixed.

kappa

The latest version of appletloader (svn) includes a workaround for this so you don't have to worry about .htaccess files in future releases.

ndhb

Quote from: ScratchBoom on May 09, 2008, 21:59:33
What is the most appropriate way to load textures without DevIL?
Should I use java ImageIO API?

I found that it is still possible to use DevIL with LWJGL 2. I simply copied the jar and dll files from the old archieve LWJGL 1.4 and everything seems to work.

Also, it is my opinion that we could use a library that offers a bit more than Slick currently does. Standard algorithms for image processing and more exotic formats (than just RGB 8bit, PNG, JPG etc.) is often needed for developing some cutting edge stuff.

Evil-Devil

Quote from: ndhb on May 18, 2008, 04:19:10
Also, it is my opinion that we could use a library that offers a bit more than Slick currently does. Standard algorithms for image processing and more exotic formats (than just RGB 8bit, PNG, JPG etc.) is often needed for developing some cutting edge stuff.
What ya need? DDS, TGA?

For TGA i posted long time ago some stuff http://lwjgl.org/forum/index.php/topic,2439.msg13498.html#msg13498 and the DDS stuff i have is quite old too. You can take a look at DDS loading here: http://www.evil-devil.com/dlfiles/dds_loader.rar

Anyway, as i have to redo alot for my current project prototype i thought of making the textureloading stuff as own lib. Only think that really make me worry is how i do this without breaking my engine design. Maybe someone have some good ideas. My current engine attempt is multithreaded for gameloop, sound and ressource loading ;)

Maybe the textureloader itself don't have to be part of the lib, only the loading routines. Guess that might be enough at all. Any comments/thoughts about?