Struggling to understand GLCanvas / GLPanel

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Struggling to understand GLCanvas / GLPanel

unixnerd
In order to make my software work with webswing I need to use GLCanvas / GLPanel as webswing doesn't like heavyweight components. I'm really struggling trying to understand how to implement this.

Right now I have a JDialog with a Canvas3D as a child and all my code uses Java3D. I think I need to change the Canvas3D to a GLCanvas? But clearly it's not that simple as things like SimpleUniverse and PickCanvas which take a Canvas3D in their constuctors won't take a GLCanvas.

I think there is something fundamental about Java3D / Jogamp and JOGL I'm failing to understand. Do need to bin my Java3D code and convert it all to JOGL equivalents?
Reply | Threaded
Open this post in threaded view
|

Re: Struggling to understand GLCanvas / GLPanel

hharrison
Java3d is essentially its own library, it started off doing its own direct OpenGL or directx rendering and eventually moved to using jogl on the backend for that part. You can't really mix and match the jogl and java3d pieces. While in the long term it's probably better to move away from canvas3d and take a render able from jogl, this would be a massive break of the java3d API and probably more trouble than it's worth for existing users.

My $0.02

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Struggling to understand GLCanvas / GLPanel

gouessej
Administrator
unixnerd, you could port your code to another 3D engine or framework that uses GLCanvas and GLJPanel, for example JogAmp's Ardor3D Continuation but it's not a trivial task and I can't be sure that Webswing will work with that.

Phil needed to use NEWT to support Android, maybe his work could be used to provide another canvas extending GLCanvas instead of using Canvas3D.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Struggling to understand GLCanvas / GLPanel

unixnerd
Thanks for the help guys, going to have to have a long think about the way forward for this.
Reply | Threaded
Open this post in threaded view
|

Re: Struggling to understand GLCanvas / GLPanel

gouessej
Administrator
Is there a public document somewhere about which subset of JOGL is supported in Webswing?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Struggling to understand GLCanvas / GLPanel

unixnerd
They have demos with source code on the website. I've raised support tickets a few times with the guys there and they're really friendly and quick in responding. Quite gutted I'm not going to be able to go forward with them :-(