LWJGL Forum

Programming => LWJGL Documentation => Topic started by: Durnus on August 09, 2009, 04:21:30

Title: AWTGLCanvas Usage? [SOLVED]
Post by: Durnus on August 09, 2009, 04:21:30
In the Applet usage page (http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/applet) on the wiki it says to use a AWTGLCanvas and use the specialized loader, and poof, you're done. I just can't figure out how to use this canvas with openGL lwjgl drawing (Using GL11 and Display and such).

If anyone could help me with this, or just tell me where to find the source of the Applet demo (http://lwjgl.org/applet/), that would be awesome.

EDIT:
Thanks to kappaOne in IRC, this thread is no longer needed. Looking closer at the Gears applet demo made it all clear.
Title: Re: AWTGLCanvas Usage?
Post by: Ciardhubh on August 09, 2009, 20:21:00
The source can be found here:
http://sourceforge.net/projects/java-game-lib/files/Official%20Releases/LWJGL%202.1.0/lwjgl-source-2.1.0.zip/download (full LWJGL source zipped, demos are in org.lwjgl.test)
or via SVN:
http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/test/applet/
Title: Re: AWTGLCanvas Usage?
Post by: Durnus on August 09, 2009, 20:37:23
Ok, to be honest I got that info from IRC but forgot to update the post. :-X Thanks for the link anyway, it confirms I have the right version of lwjgl and the examples.

Even looking at that, though, I don't understand how it's supposed to work. It seems like AppletLoaderTest.java is the Applet that's being loaded, but it doesn't run when I try to run it (no constructor, and when I add one it complains validly that openGL isn't initialized) and it doesn't even add a AWTGLCanvas to the layout like the tutorial says to do. What am I missing? How does it all fit together?