Main Menu

Applets and OpenGL

Started by EgonOlsen, April 25, 2005, 08:56:22 PM

Previous topic - Next topic

EgonOlsen

Question: Can jPCT's OpenGL renderer render into an applet using the new GLCanvas support in (upcoming) 1.06? Yes, it can:



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...

rolz

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 ?
Regards,
Andrei

EgonOlsen

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?

mogli

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?

EgonOlsen

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.

mogli

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?

EgonOlsen

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.

mogli

k, thx. but i will continue to test it as an applet. so users have to have at minimum a middle-aged pc. ;)

Melssj5

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.
Nada por ahora

mogli

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 ;)

Melssj5

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.
Nada por ahora

Fencer

I guess LWJGL 1.0 beta 2 was not out when this thread had started, so maybe this tutorial could bring new ideas here, or was it already discussed elsewhere?

Filip

Jamison

Why not just bundle the jPCT library in the JAR along with the Applet?

cyberkilla

Because it's complicated. I thought about this, but it isn't the prettiest
setup.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

EgonOlsen

The new version of LWJGL contains some stuff to easy applet using IIRC. But i haven't tried it myself.