Login  Register

Re: New to JOGL / NEWT

Posted by Demoscene Passivist on Dec 29, 2010; 2:21am
URL: https://forum.jogamp.org/New-to-JOGL-NEWT-tp2157407p2160491.html

For an example of how to get a NEWT window for rendering up and running with keylisteners attached u can take a look at my Github repository:

https://github.com/demoscenepassivist/SocialCoding/blob/master/code_demos_jogamp/src/framework/base/BaseGlobalEnvironment.java#L83

API wise NEWT isn't really different from using JOGL with AWT. Generally it's easy to migrate code from AWT/GLCanvas to NEWT. Just a few search'n'replace operations and ur good to go.

For a "cross reference" example of nearly the same JOGL window setup using the good old AWT u can take a look here: https://github.com/demoscenepassivist/SocialCoding/blob/master/code_demos_jogamp/src/framework/base/BaseGlobalEnvironment.java#L373