Login  Register

Re: Simple example with Nifty

Posted by elect on Nov 08, 2013; 3:01pm
URL: https://forum.jogamp.org/Simple-example-with-Nifty-tp4030529p4030537.html

Xerxes Rånby wrote
Oh kudos for porting the jogl 2 backend it over to the 1.4 branch!



Try avoid using the old GLCanvas since it depend on AWT and this prevent the code to run on new devices such as Android and Raspberry Pi where AWT cant be found or be hardware accelerated.

If you must use AWT/Swing then place the GLWindow inside the Swing or AWT application using a NewtCanvasAWT . This is the only canvas compatible with NEWT.
Try do somehing like:
NewtCanvasAWT newtCanvas = new NewtCanvasAWT(glWindow);
frame.add(newtCanvas);

http://jogamp.org/jogl/doc/NEWT-Overview.html
http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/awt/NewtCanvasAWT.html
No, for the moment I dont have to use it, it was just because I was used to use glcanvas

So GLwindow is better and the future? Ok, I am going to use that then

Thanks