www.jpct.net

General => News => Topic started by: EgonOlsen on April 25, 2005, 08:56:22 pm

Title: Applets and OpenGL
Post by: EgonOlsen on April 25, 2005, 08:56:22 pm
Question: Can jPCT's OpenGL renderer render into an applet using the new GLCanvas support in (upcoming) 1.06? Yes, it can:

(http://www.jpct.net/img/lwjgl_applet.jpg)

It's quite slow (about 1/10th of the normal speed) and has a lot of pitfalls regarding loading of the native library, but it works...
Title: wow
Post by: rolz on April 27, 2005, 09:52:29 am
Too bad for me ;) i've already switched to desktop app ;)

just kidding, looks really nice.

btw, what pitfalls do you mean except signing the applet ?
Title: Re: wow
Post by: EgonOlsen on April 27, 2005, 10:50:12 am
Quote from: "rolz"
btw, what pitfalls do you mean except signing the applet ?
Loading the native parts (dll, so, jnilib) is a pain. There is no other way than loading it from the server via http and copying it to the local harddisc. And even then, loading it via System.load("...."); fails at least in Firefox (haven't tried IE), so i had to copy it into the firefox installation directory...ARGHHH! And it's slow...so using it in applet is possible in a controlled environment, but for a web-distributed game...not really!

BTW: Are you using the AWTGLRenderer now? Any feedback on how it works?
Title: Applets and OpenGL
Post by: mogli on April 21, 2006, 12:20:25 pm
is there a possiblity to use opengl hardware renderer in applets without major difficulties?

or there any newer informations about using hardware renderer in applets?
Title: Applets and OpenGL
Post by: EgonOlsen on April 21, 2006, 06:03:37 pm
Quote from: "mogli"

or there any newer informations about using hardware renderer in applets?
Not from my side....it is possible to do this, the problem lies in loading the native parts. There are solutions out there, but i don't know them. However, in Firefox you seem to be limited to around 30fps anyway while in IE, applets using OpenGL run at full speed. The reason is unknown to me. There is a project to embed JOGL (JOGLAppletLauncher, i think) into an applet and it should be possible to port that to LWJGL without much hassle, because the basic problem is exactly the same.
If it's worth it...that's another question. You'll need a 1.4+ VM anyway, so you may use webstart as well.
Title: Applets and OpenGL
Post by: mogli on April 22, 2006, 09:28:01 am
hmm, it's a pity. ;)
webstart is not the thing i want or have to use.

but a question about webstart: with webstart i download the complete application, is that right? is there also the possibilty to stream objects after loading the "main-part" of my world?
Title: Applets and OpenGL
Post by: EgonOlsen on April 24, 2006, 08:59:01 pm
Quote from: "mogli"
but a question about webstart: with webstart i download the complete application, is that right? is there also the possibilty to stream objects after loading the "main-part" of my world?
What applies to an applet applies to webstart. You may of course use http (or any other protocol that fits) to stream load content.
Title: Applets and OpenGL
Post by: mogli on April 25, 2006, 09:09:59 am
k, thx. but i will continue to test it as an applet. so users have to have at minimum a middle-aged pc. ;)
Title: Applets and OpenGL
Post by: Melssj5 on April 25, 2006, 05:57:34 pm
I made a program using applets and opengl. It was basically a render of a map, but it took a lot of time to load, in dial up about 9 - 15 minutes. While waiting it to load the browser seems to crash but is not. I recomend to use ajax to make the applet load a thread and making able to continue working while it loads.
Title: Applets and OpenGL
Post by: mogli on April 25, 2006, 09:03:04 pm
i don't exactly know what you want to say. i think you post is about handle loading big files, isn't it?
did you use opengl-hardware renderer?
because the problem i have is that software renderer needs good processing power than textures in my applet are too big. ;)
with streaming in my applet i have no problem...or not yet ;)
Title: Applets and OpenGL
Post by: Melssj5 on April 25, 2006, 09:40:52 pm
Yes, thge 3DS map is about 970 KB, the textures, the map, the code and everything is about 3.5 MB. in anyway it loads fast from the local machine, but when I uploaded it it took many time. But the problem is not onluy the time, but also what happens to the browser while it is loading. It seems to be crashed, you cannot work until everything have ended to load.

Visit this URL, I have it there.

http://comunidad3d.webcindario.com/TestSS3D

yo need to copy the dll file into the system32 folder first. I made a code to do it automatically but still having problems with it.
Title: Applets and OpenGL
Post by: Fencer on September 25, 2006, 04:17:38 pm
I guess LWJGL 1.0 beta 2 was not out when this thread had started, so maybe this tutorial (http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/applet) could bring new ideas here, or was it already discussed elsewhere?

Filip
Title: Applets and OpenGL
Post by: Jamison on September 29, 2006, 05:05:28 pm
Why not just bundle the jPCT library in the JAR along with the Applet?
Title: Applets and OpenGL
Post by: cyberkilla on January 10, 2007, 07:32:25 pm
Because it's complicated. I thought about this, but it isn't the prettiest
setup.
Title: Applets and OpenGL
Post by: EgonOlsen on January 10, 2007, 07:38:03 pm
The new version of LWJGL contains some stuff to easy applet using IIRC. But i haven't tried it myself.