Jogl and the Netbeans Platform ¿can you help me?

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

Jogl and the Netbeans Platform ¿can you help me?

bardackx
I need to render a GLCanvas inside a Window or TopComponent ¿how can i do that? (So far I have a Module for storing the jogl libraries, the project compiles and run, and even adds the GLCanvas to the Window or TopComponent, but it doesnt make any call to the init, display, reshape methods, I can make a new JFrame with the canvas but it is not what I need, any help is apreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Jogl and the Netbeans Platform ¿can you help me?

Michael Bien
hi bardackx,

a few questions...
which version of NB and JOGL are you using?
does the same code work outside netbeans?
did you call GLProfile.initSingleton(false)?

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

Re: Jogl and the Netbeans Platform ¿can you help me?

Wade Walker
Administrator
In reply to this post by bardackx
It's possible to do JOGL 2 in a JWindow, if that works for you. If you take the JFrame example from http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing, and just change the JFrame to a JWindow, it works fine. The problem is you can't close the app when you do that, since there's no close button  I assume your app has some way to handle that, though.
Reply | Threaded
Open this post in threaded view
|

Re: Jogl and the Netbeans Platform ¿can you help me?

bardackx
In reply to this post by bardackx
I am using the signed candidate and jogl work great in my other projects, I just cant manage to use it on my Netbeans Platform Project (It is more a matter of knowledge on the netbeans platform, I dont want to be offtopic here but I dont know what to do)
Reply | Threaded
Open this post in threaded view
|

Re: Jogl and the Netbeans Platform ¿can you help me?

Wade Walker
Administrator
Sorry bardackx, I don't have any experience using JOGL in the Netbeans Platform. It does work with Eclipse RCP which is a similar framework, so it should just be a matter of some Netbeans knowledge to get it working. When you figure it out, could you link to an example here? This knowledge could be useful to others.
Reply | Threaded
Open this post in threaded view
|

Re: Jogl and the Netbeans Platform ¿can you help me?

Michael Bien
In reply to this post by bardackx
  NetBeans is like any other swing application. If you are initializing
jogl properly and using the latest version (remember the questions i
asked you before?) it should just work. (since you already testing it on
the platform i suppose you packaged it as module and the natives are in
the path already).

NB 6.9 and NB 7 changed module loading a bit. But i can't help if you
don't give me any info.

-michael

On 02/13/2011 05:31 AM, bardackx [via jogamp] wrote:

> I am using the signed candidate and jogl work great in my other projects, I
> just cant manage to use it on my Netbeans Platform Project (It is more a
> matter of knowledge on the netbeans platform, I dont want to be offtopic
> here but I dont know what to do)
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://forum.jogamp.org/Jogl-and-the-Netbeans-Platform-can-you-help-me-tp2482729p2484024.html
> To start a new topic under jogamp, email [hidden email]
> To unsubscribe from jogamp, visit
http://michael-bien.com/

Reply | Threaded
Open this post in threaded view
|

Re: Jogl and the Netbeans Platform ¿can you help me?

Art B
Both JOGL 1.1 and 2.0 work well in the Netbeans Platform.

For 2.0 I created two library modules.  One for the java jars and the other for the native libraries.  Place the native libraries in the release/modules/lib folder.  In the project.properties add the argument "run.args.extra=-J-Djava.library.path=../{appname}/release/modules/lib" and replace {appname} with your application root folder name.  Then add a GLJPanel to a top component as you would in a regular swing application.  The GLCanvas can be used but doesn't handle resize well in a platform style application.