Author Topic: Applets and OpenGL  (Read 15577 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Applets and OpenGL
« 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:



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

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
wow
« Reply #1 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 ?
Regards,
Andrei

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: wow
« Reply #2 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?

Offline mogli

  • byte
  • *
  • Posts: 38
    • View Profile
Applets and OpenGL
« Reply #3 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Applets and OpenGL
« Reply #4 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.

Offline mogli

  • byte
  • *
  • Posts: 38
    • View Profile
Applets and OpenGL
« Reply #5 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Applets and OpenGL
« Reply #6 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.

Offline mogli

  • byte
  • *
  • Posts: 38
    • View Profile
Applets and OpenGL
« Reply #7 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. ;)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Applets and OpenGL
« Reply #8 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.
Nada por ahora

Offline mogli

  • byte
  • *
  • Posts: 38
    • View Profile
Applets and OpenGL
« Reply #9 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 ;)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Applets and OpenGL
« Reply #10 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.
Nada por ahora

Offline Fencer

  • byte
  • *
  • Posts: 21
    • View Profile
    • http://BrainKing.com
Applets and OpenGL
« Reply #11 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 could bring new ideas here, or was it already discussed elsewhere?

Filip

Offline Jamison

  • byte
  • *
  • Posts: 12
    • View Profile
Applets and OpenGL
« Reply #12 on: September 29, 2006, 05:05:28 pm »
Why not just bundle the jPCT library in the JAR along with the Applet?

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Applets and OpenGL
« Reply #13 on: January 10, 2007, 07:32:25 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Applets and OpenGL
« Reply #14 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.