Author Topic: Is it possible to support JoGL?  (Read 10032 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Is it possible to support JoGL?
« Reply #15 on: April 15, 2009, 07:42:13 pm »
Egon, can I ask what it is you e-mail him? I'm very interested in this issue right now.
Sure. That were the GL related parts of jPCT for him to port to jogl...which he already did. However, i'm undecided what to do with the port. I can't use it in the way it is, because it's a straight port and it removes LWJGL support. I also don't want to take care of another renderer nor do i want to add an abstraction layer that increases size and slows things down. I have an idea that *might* work instead and i'm currently looking at the port to give it a try...i'll keep you posted.

Offline AGP

  • quad
  • ******
  • Posts: 1515
    • View Profile
Re: Is it possible to support JoGL?
« Reply #16 on: April 15, 2009, 08:30:31 pm »
Cool, thanks a lot.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Is it possible to support JoGL?
« Reply #17 on: April 15, 2009, 11:19:34 pm »
Works pretty well so far...many many thanks to bilbo0s for his initial port. It has been VERY helpful to me. What i have working now is this: jPCT's renderers are still using LWJGL as ever before. In addition, i'll supply a small jar (around 15kb) called glfacade.jar. If this jar is in the classpath, LWJGL must not be there and JOGL has to be. If this is given and you enable jPCT's canvas renderer, you'll get a JOGL GLCanvas instead and all the rendering magically happens on this canvas. If you enable the normal GLRenderer, you'll get a crash...which is not nice. The denial should be more gracefully...i guess i have to work on this some more...



Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Is it possible to support JoGL?
« Reply #18 on: April 16, 2009, 12:24:08 am »
Great Egon :D I'm not sure what are the big advantages of JOGL vs LWJGL, but its nice to be able to JOGL instead of LWJGL if I ever need to. Also, JOGL should continue to have support from Sun since it is used, I think, in JavaFX.
« Last Edit: April 16, 2009, 01:04:44 am by JavaMan »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Is it possible to support JoGL?
« Reply #19 on: April 16, 2009, 07:29:20 am »
Great Egon :D I'm not sure what are the big advantages of JOGL vs LWJGL, but its nice to be able to JOGL instead of LWJGL if I ever need to. Also, JOGL should continue to have support from Sun since it is used, I think, in JavaFX.
Personally, i don't see any advantages...expect for the security dialog thing maybe. I like LWJGL more, but maybe i'm just used to it. But with the current implementation, i can almost ignore the fact that JOGL support is there somehow, which is what i wanted. The drawback is, that you can't switch renderers on the fly, but why would you!? At least that's better than having multiple renderers added to the engine and only one works correctly (like in JME and xith, where JOGL support is broken in JME and LWJGL support is broken in xith).

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Is it possible to support JoGL?
« Reply #20 on: April 16, 2009, 07:39:01 am »
Sounds great that your adding in JOGL support. Everyone at the JavaGaming.Org site knows 1 person over who would loves JOGL ::) , which he says it has less bugs. If that's true or not, at least you get people who think that will use your engine now.  :)
You could also benchmark and see if there's any speed differences  ;) That's if your not sick of benchmarks....
« Last Edit: April 16, 2009, 09:06:03 am by zammbi »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Is it possible to support JoGL?
« Reply #21 on: April 16, 2009, 08:11:33 am »
Everyone at the JavaGaming.Org site knows 1 person over who would loves JOGL ::) , which he says it has less bugs.
Ahem...yes. Must be the reason why the stable release of JOGL didn't even work out of the box because a jar was missing...

You could also benchmark and see if there's any speed differences  ;) That's if your not sick of benchmarks....
It should be a little slower than LWJGL, because it carries the overhead of the AWTGLRenderer with it and all GL-calls go through the facade...plus a tiny little bit of reflection code that i had to use. It shouldn't really matter though and the reflection part can be speed up anyway if needed.

Offline AGP

  • quad
  • ******
  • Posts: 1515
    • View Profile
Re: Is it possible to support JoGL?
« Reply #22 on: April 16, 2009, 08:10:56 pm »
Also, from what I understand, lwjgl supports OpenGL 3.0 whereas JoGL only supports 2. Still, I'm getting my ass kicked by an lwjgl applet (their appletloader system is clever but doesn't seem to work all the time), so maybe JoGL can help there. Again, Egon, I appreciate all you do here a whole lot. So thanks.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Is it possible to support JoGL?
« Reply #23 on: April 16, 2009, 08:32:14 pm »
OpenGL 3.0 doesn't have much relevance IMHO. If you create a real OpenGL 3.0 context, absolutely nothing will work in jPCT (or any other engine), because they have deprecated almost everything that isn't shader related. In a real 3.0 context, you have to do everything with shaders...there's no support for any fixed function pipeline stuff anymore. However, you can use an 3.0 context that stays compatible with 2.x...but all you get are a few extensions. Nothing to get crazy about.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Is it possible to support JoGL?
« Reply #24 on: April 16, 2009, 09:28:27 pm »
I've just released a second beta that includes the JOGL option. See the news section for more details.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Is it possible to support JoGL?
« Reply #25 on: April 16, 2009, 09:40:32 pm »
It should be a little slower than LWJGL, because it carries the overhead of the AWTGLRenderer with it and all GL-calls go through the facade...plus a tiny little bit of reflection code that i had to use. It shouldn't really matter though and the reflection part can be speed up anyway if needed.
I stand corrected: Performance is on par with LWJGL. The additional overhead of the facade and reflection isn't noticable.