New tutorial for JOGL in Eclipse RCP application

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

New tutorial for JOGL in Eclipse RCP application

Wade Walker
Administrator
Hi guys,

I wrote a tutorial that will guide a total newbie through creating a complete Eclipse Rich Client Platform (RCP) application that shows a JOGL demo in a window. It's on my blog at http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/.

This tutorial project is a suitable foundation for many kinds of cross-platform non-game graphical applications (3-D design and animation, CAD, EDA, etc.).

I work at a microprocessor company where we use JOGL and Eclipse RCP to write apps that let our engineers create and edit hardware designs. I thought I'd try to give back to the community a bit by posting some tutorials on topics that would have helped me when I was starting out. I'll create more tutorials as I come across good topics.

Huge thanks to Michael and Sven for keeping JOGL alive!

-w
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Michael Bien
wow thats great! Thank you very much. I'll link it from the wiki.

I am a bit rusty with eclipse RCP - thats a perfect opportunity for me to get my hands dirty again :)

best regards,
michael

On 10/09/2010 04:48 PM, wwalker3 [via jogamp] wrote:
Hi guys,

I wrote a tutorial that will guide a total newbie through creating a complete Eclipse Rich Client Platform (RCP) application that shows a JOGL demo in a window. It's on my blog at http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/.

This tutorial project is a suitable foundation for many kinds of cross-platform non-game graphical applications (3-D design and animation, CAD, EDA, etc.).

I work at a microprocessor company where we use JOGL and Eclipse RCP to write apps that let our engineers create and edit hardware designs. I thought I'd try to give back to the community a bit by posting some tutorials on topics that would have helped me when I was starting out. I'll create more tutorials as I come across good topics.

Huge thanks to Michael and Sven for keeping JOGL alive!

-w


View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1670638.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.



-- 
- - - -
http://michael-bien.com
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Sven Gothel
Administrator
In reply to this post by Wade Walker
On Saturday, October 09, 2010 16:48:35 wwalker3 [via jogamp] wrote:

>
> Hi guys,
>
> I wrote a tutorial that will guide a total newbie through creating a
> complete Eclipse Rich Client Platform (RCP) application that shows a JOGL
> demo in a window. It's on my blog at
> http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/
> http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/
> .
>
> This tutorial project is a suitable foundation for many kinds of
> cross-platform non-game graphical applications (3-D design and animation,
> CAD, EDA, etc.).
>
> I work at a microprocessor company where we use JOGL and Eclipse RCP to
> write apps that let our engineers create and edit hardware designs. I
> thought I'd try to give back to the community a bit by posting some
> tutorials on topics that would have helped me when I was starting out. I'll
> create more tutorials as I come across good topics.

Sounds great, will digg into it later and link it to our wiki.

Maybe you and your company like to do/have a more native
Eclipse binding via NEWT to SWT ?
Let's chat about this via email, if you have interest.

>
> Huge thanks to Michael and Sven for keeping JOGL alive!

You are very welcome.

Cheers, Sven

>
> -w
>
> ______________________________________
> View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1670638.html
> To start a new topic under jogamp, email [hidden email]
> To unsubscribe from jogamp, click http://jogamp.762907.n3.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=762907&code=c2dvdGhlbEBqYXVzb2Z0LmNvbXw3NjI5MDd8NDU1NjU4MjUx
>


--
health & wealth
mailto:[hidden email] ; http://jausoft.com
land : +49 (471) 4707742 ; cell: +49 (151) 28145941
Timezone CET: PST+9, EST+6, UTC+1
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

gouessej
Administrator
In reply to this post by Wade Walker
Thank you very much wwalker3, I use Eclipse (Helios 1.6) RCP with JOGL (1.1.1a & 2.0 beta) since november 2009 and recently with Ardor3D (I have ported it for JOGL 2 recently). I'm going to read your tutorial :)

Sven Gothel wrote
Maybe you and your company like to do/have a more native
Eclipse binding via NEWT to SWT ?
Let's chat about this via email, if you have interest.
Don't worry, I will look at this when Ardor3D is "JOGL 2 ready". Such an integration with SWT would be excellent for professional applications :)
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Michael Bien
In reply to this post by Wade Walker
would it be ok if i would add your java-opengl blog feed to hungry-harry our feed aggregator?
-> http://jogamp.org/blog/

-michael

On 10/09/2010 04:48 PM, wwalker3 [via jogamp] wrote:
Hi guys,

I wrote a tutorial that will guide a total newbie through creating a complete Eclipse Rich Client Platform (RCP) application that shows a JOGL demo in a window. It's on my blog at http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/.

This tutorial project is a suitable foundation for many kinds of cross-platform non-game graphical applications (3-D design and animation, CAD, EDA, etc.).

I work at a microprocessor company where we use JOGL and Eclipse RCP to write apps that let our engineers create and edit hardware designs. I thought I'd try to give back to the community a bit by posting some tutorials on topics that would have helped me when I was starting out. I'll create more tutorials as I come across good topics.

Huge thanks to Michael and Sven for keeping JOGL alive!

-w


View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1670638.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.



-- 
- - - -
http://michael-bien.com
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

gouessej
Administrator
In reply to this post by Wade Walker
It is strange, you mix org.eclipse.swt.opengl.GLCanvas with JOGL 2. I use another approach, I use the GLCanvas of JOGL 2 and I put it into an AWT frame that I get from an SWT/AWT helper. I didn't know that you could mix so easily the OpenGL of the SWT API and JOGL 2.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Sven Gothel
Administrator
In reply to this post by Wade Walker
On Saturday, October 09, 2010 17:10:12 Sven Gothel wrote:

> On Saturday, October 09, 2010 16:48:35 wwalker3 [via jogamp] wrote:
> >
> > Hi guys,
> >
> > I wrote a tutorial that will guide a total newbie through creating a
> > complete Eclipse Rich Client Platform (RCP) application that shows a JOGL
> > demo in a window. It's on my blog at
> > http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/
> > http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/
> > .
> >
> > This tutorial project is a suitable foundation for many kinds of
> > cross-platform non-game graphical applications (3-D design and animation,
> > CAD, EDA, etc.).
> >
> > I work at a microprocessor company where we use JOGL and Eclipse RCP to
> > write apps that let our engineers create and edit hardware designs. I
> > thought I'd try to give back to the community a bit by posting some
> > tutorials on topics that would have helped me when I was starting out. I'll
> > create more tutorials as I come across good topics.
>
> Sounds great, will digg into it later and link it to our wiki.

I see, Michael already added it :)
Updated it a bit .. and added Rami's blog as well.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Demoscene Passivist
Administrator
In reply to this post by Wade Walker
 Jogamp is always in need of good tutorials. Definitely a nice addition to the Wiki. Keep up the good work!

Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Wade Walker
Administrator
In reply to this post by Michael Bien
Yes, go ahead and add or link it anywhere you want.
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Wade Walker
Administrator
In reply to this post by gouessej
This tutorial was partly an experiment to see if the SWT GLCanvas would work correctly with JOGL 2 -- so far, it seems to work fine  I've used it extensively with JOGL 1.1.1 at work, but the work schedule so far hasn't allowed porting all the rest of our code to JOGL 2.

Since I'm writing Eclipse RCP apps, I try to use SWT only, since that's the same toolkit Eclipse is built with. I always worried that putting in any AWT stuff might cause problems with window messages getting delivered correctly.
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Sven Gothel
Administrator
On Saturday, October 09, 2010 21:07:10 wwalker3 [via jogamp] wrote:
>
> This tutorial was partly an experiment to see if the SWT GLCanvas would work
> correctly with JOGL 2 -- so far, it seems to work fine  I've used it
> extensively with JOGL 1.1.1 at work, but the work schedule so far hasn't
> allowed porting all the rest of our code to JOGL 2.
>
> Since I'm writing Eclipse RCP apps, I try to use SWT only, since that's the
> same toolkit Eclipse is built with. I always worried that putting in any AWT
> stuff might cause problems with window messages getting delivered correctly.

Indeed .. my recommendation is to avoid AWT if possible as well.

If you really need, please try out the NewtCanvasAWT,
which attaches a native NEWT window as a child to the native AWT peer.
Works so far pretty well, ie no AWT-EDT slow down.

In regards to SWT, we may like to add a better native support for it.
Don't know if the current situation is capable of all GL profiles etc.

However, great stuff - good work, thank you Wade.

Cheers, Sven
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Michael Bien
In reply to this post by Wade Walker
done
http://jogamp.org/blog/

On 10/09/2010 09:01 PM, wwalker3 [via jogamp] wrote:
Yes, go ahead and add or link it anywhere you want.


View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1671644.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.


-- 
http://michael-bien.com/
Reply | Threaded
Open this post in threaded view
|

RE: New tutorial for JOGL in Eclipse RCP application

Wade Walker
Administrator

Thanks Michael!

 

One small thing I noticed, though -- the quote marks have all been replaced by "?", both in my blog post and the others below it. Is there some setting in the aggregator for this? It's still readable, though, so not a huge problem.

 

-w

 

From: Michael Bien [via jogamp] [mailto:[hidden email]]
Sent: Sunday, October 10, 2010 12:08 PM
To: Wade Walker
Subject: Re: New tutorial for JOGL in Eclipse RCP application

 

done
http://jogamp.org/blog/

On 10/09/2010 09:01 PM, wwalker3 [via jogamp] wrote:

Yes, go ahead and add or link it anywhere you want.


View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1671644.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

 



-- 
http://michael-bien.com/

 


View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1675655.html
To unsubscribe from New tutorial for JOGL in Eclipse RCP application, click here.

 

Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Michael Bien
yeah. its a string encoding issue. I thought i fixed it... apparently not... hmm

On 10/10/2010 09:13 PM, Wade Walker [via jogamp] wrote:

Thanks Michael!

 

One small thing I noticed, though -- the quote marks have all been replaced by "?", both in my blog post and the others below it. Is there some setting in the aggregator for this? It's still readable, though, so not a huge problem.

 

-w

 

From: Michael Bien [via jogamp] [mailto:[hidden email]]
Sent: Sunday, October 10, 2010 12:08 PM
To: Wade Walker
Subject: Re: New tutorial for JOGL in Eclipse RCP application

 

done
http://jogamp.org/blog/

On 10/09/2010 09:01 PM, wwalker3 [via jogamp] wrote:

Yes, go ahead and add or link it anywhere you want.


View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1671644.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

 



-- 
http://michael-bien.com/

 


View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1675655.html
To unsubscribe from New tutorial for JOGL in Eclipse RCP application, click here.

 




View message @ http://jogamp.762907.n3.nabble.com/New-tutorial-for-JOGL-in-Eclipse-RCP-application-tp1670638p1676276.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.


-- 
http://michael-bien.com/
Reply | Threaded
Open this post in threaded view
|

RE: New tutorial for JOGL in Eclipse RCP application

gouessej
Administrator
In reply to this post by Wade Walker
As the Eclipse Foundation has quite given up GEF 3D and seems not to really maintain its own OpenGL binding, is the use of SWT OpenGL canvas a good idea on the long term?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

RE: New tutorial for JOGL in Eclipse RCP application

Wade Walker
Administrator
> As the Eclipse Foundation has quite given up GEF 3D and seems not to really maintain its own OpenGL
> binding, is the use of SWT OpenGL canvas a good idea on the long term?

It's hard to be sure. With open-source you can never really tell what's going to work in the long term, unfortunately. The SWT GLCanvas was around long before GEF 3D (we've been using it at work since 2006 or so), so I'm not really worried that GEF 3D failing will affect it.

Since SWT is what all of Eclipse is based on, and I'm writing apps based on Eclipse RCP, it seemed like a good bet to use the SWT GLCanvas instead of the AWT one.

And for science/engineering apps like I write, I need to be able to count on all the window messages working correctly with the canvas inside an SWT application framework, which seemed more likely with SWT GLCanvas than with AWT or NEWT. But I haven't tried using those other options in a complex app -- they might be just as good or better than SWT.

I can't claim that there'll never be a problem with the way I'm doing things in these tutorials. But I can say that I've used this way at work for about five years on a very complex engineering application, and I haven't run into an insurmountable problem so far
Reply | Threaded
Open this post in threaded view
|

RE: New tutorial for JOGL in Eclipse RCP application

gouessej
Administrator
This post was updated on .
Wade Walker wrote
It's hard to be sure. With open-source you can never really tell what's going to work in the long term, unfortunately. The SWT GLCanvas was around long before GEF 3D (we've been using it at work since 2006 or so), so I'm not really worried that GEF 3D failing will affect it.
I see what you mean but I spoke to some members of the Eclipse Foundation and it is clear that the OpenGL binding of SWT is not actively maintained. I don't say that it has to be thrown into the trashbin but we have to be aware of this problem.


Wade Walker wrote
Since SWT is what all of Eclipse is based on, and I'm writing apps based on Eclipse RCP, it seemed like a good bet to use the SWT GLCanvas instead of the AWT one.
SWT is a good bet on my view, I write Eclipse RCP applications too but it does not mean that SWT GLCanvas is a good bet. I'm aware of the weakness of SWT, especially on Linux, I have to mix SWT and AWT in some situations including the drag and drop because of known bugs never fixed on Linux.

Wade Walker wrote
And for science/engineering apps like I write, I need to be able to count on all the window messages working correctly with the canvas inside an SWT application framework, which seemed more likely with SWT GLCanvas than with AWT or NEWT. But I haven't tried using those other options in a complex app -- they might be just as good or better than SWT.
JOGL GLCanvas is fast and reliable even in Eclipse RCP applications when using JOGL 1.1.1a (there are still locking and focus problems with JOGL 2.0), NEWT is a bit faster in some situations but there are some bugs on Linux and I don't know how it works on Mac OS X. The SWT_AWT helper is very useful and works really fine, I only had to add a fix for Linux that will be included in Java 1.7.

Wade Walker wrote
I can't claim that there'll never be a problem with the way I'm doing things in these tutorials. But I can say that I've used this way at work for about five years on a very complex engineering application, and I haven't run into an insurmountable problem so far
Did you measure the memory footprint?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

RE: New tutorial for JOGL in Eclipse RCP application

Wade Walker
Administrator
gouessej wrote
I see what you mean but I spoke to some members of the Eclipse Foundation and it is clear that the OpenGL binding of SWT is not actively maintained. I don't say that it has to be thrown into the tashbin but we have to be aware of this problem.
You're right, I looked at the SWT bug logs and I can see that not much work is done on SWT GLCanvas. If I run into problems, I will ask the JOGL community for advice and maybe switch to the JOGL GLCanvas at that point.

gouessej wrote
Wade Walker wrote
I can't claim that there'll never be a problem with the way I'm doing things in these tutorials. But I can say that I've used this way at work for about five years on a very complex engineering application, and I haven't run into an insurmountable problem so far
Did you measure the memory footprint?
Our engineering/science apps are not as graphically demanding as games are  We may have 2 million triangles per scene, but not many textures, so the graphics memory usage is only maybe ~50MB.

Our memory usage is almost all in the Java heap, and we run into the 32-bit limit there all the time because of our huge data sets. We use the Eclipse Memory Analyzer to do heap profiling, and it's been very helpful in shrinking our memory footprints.
Reply | Threaded
Open this post in threaded view
|

RE: New tutorial for JOGL in Eclipse RCP application

gouessej
Administrator
Wade Walker wrote
You're right, I looked at the SWT bug logs and I can see that not much work is done on SWT GLCanvas. If I run into problems, I will ask the JOGL community for advice and maybe switch to the JOGL GLCanvas at that point.
I'll be there ;) If you want, we could add a section with a working example using JOGL Canvas into your tutorial.

Wade Walker wrote
Our engineering/science apps are not as graphically demanding as games are  We may have 2 million triangles per scene, but not many textures, so the graphics memory usage is only maybe ~50MB.

Our memory usage is almost all in the Java heap, and we run into the 32-bit limit there all the time because of our huge data sets. We use the Eclipse Memory Analyzer to do heap profiling, and it's been very helpful in shrinking our memory footprints.
Thanks for the tips :)
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: New tutorial for JOGL in Eclipse RCP application

Pavan Kumar
In reply to this post by Wade Walker
I am trying to find the jar files JOGL - for windows 7, can anyone help where I can get these jar files.
Thanks for your help
Pavan
12