I have a simple applet that should help you get started. It demonstrates how to load and set up 3DS models, how to use hardware rendering in an applet, and how to switch between hardware and software rendering modes on the fly.
Here is a link to the source code:
http://www.paulscode.com/demos/jpct/jPCTGears/jPCTGearsSource.zipTo use hardware rendering in an applet, you must load it with the lwjgl applet loader, which you can download from:
http://www.lwjgl.orgHere are some instructions for using the applet loader, in case you have problems figuring out how to make it work:
You must place the following files (plus your program jar) somewhere online:
jpct.jar
lzma.jar
lwjgl_util_applet.jar
lwjgl.jar.pack.lzma
lwjgl_util.jar.pack.lzma
jinput.jar.pack.lzma
res.jar.lzma
windows_natives.jar.lzma
linux_natives.jar.lzma
macosx_natives.jar.lzma
solaris_natives.jar.lzma
Plus the two loader image files (in this example I am using paulscodelogo.png and paulscodeprogress.gif)
Next you need to create an html file to load the applet. Here is the html I used in the gears demo example:
<html><body>
<applet code="org.lwjgl.util.applet.AppletLoader"
archive="http://www.paulscode.com/libs/lwjgl/JARs/lwjgl_util_applet.jar,
http://www.paulscode.com/libs/lwjgl/JARs/lzma.jar"
codebase="." width="640" height="480">
<param name="al_title" value="jPCTGears">
<param name="al_main" value="jPCTGears">
<param name="al_logo" value="http://www.paulscode.com/libs/lwjgl/paulscodelogo.png">
<param name="al_progressbar" value="http://www.paulscode.com/libs/lwjgl/paulscodeprogress.gif">
<param name="al_jars"
value="http://www.paulscode.com/demos/jpct/jPCTGears/jPCTGears.jar,
http://www.paulscode.com/libs/jpct/jpct.jar,
http://www.paulscode.com/libs/lwjgl/JARs/lwjgl.jar.pack.lzma,
http://www.paulscode.com/libs/lwjgl/JARs/jinput.jar.pack.lzma,
http://www.paulscode.com/libs/lwjgl/JARs/lwjgl_util.jar.pack.lzma,
http://www.paulscode.com/libs/lwjgl/JARs/res.jar.lzma">
<param name="al_windows" value="http://www.paulscode.com/libs/lwjgl/JARs/windows_natives.jar.lzma">
<param name="al_linux" value="http://www.paulscode.com/libs/lwjgl/JARs/linux_natives.jar.lzma">
<param name="al_mac" value="http://www.paulscode.com/libs/lwjgl/JARs/macosx_natives.jar.lzma">
<param name="al_solaris" value="http://www.paulscode.com/libs/lwjgl/JARs/solaris_natives.jar.lzma">
<param name="al_version" value="1.0">
</applet>
</body></html>
Just substitute your own files and class names.
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.Edit the file you created, with notepad or other text editor. Add the line:
AddType application/x-lzma .lzma
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 itThat's it. Let me know if you need any further clarification.
And for reference, here is a link to the working gears demo applet:
http://www.paulscode.com/demos/jpct/jPCTGears/