Re: Simple example with Nifty
Posted by
Xerxes Rånby on
Nov 08, 2013; 2:48pm
URL: https://forum.jogamp.org/Simple-example-with-Nifty-tp4030529p4030536.html
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.htmlhttp://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/awt/NewtCanvasAWT.html