LWJGL
February 07, 2012, 06:06:13 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Using LWJGL with SWT canvas  (Read 4362 times)
jonkri
Newbie
*
Posts: 9


« on: October 08, 2008, 19:28:29 »

Hello everyone!

I'm using the OGRE 3D engine through ogre4j to draw on a SWT canvas. The possibility to draw on an AWT canvas is not currently available in ogre4j. Anyway, in order for me to use LWJGL I need to wrap my canvas into a LWJGL Display somehow. Is there a way to do this?

Thank you in advance!

Warm regards,
Jon Kristensen
Logged
Matzon
Administrator
Demigod
*****
Posts: 2163



« Reply #1 on: October 08, 2008, 22:55:16 »

swt supports using lwjgl as a backend - there are some snippets on eclipse.org. LWJGL has the possibility to draw into any canvas using the Display.setParent() feature.
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
jonkri
Newbie
*
Posts: 9


« Reply #2 on: October 09, 2008, 09:21:27 »

Thank you for your reply. However, I don't quite understand.

The only snippet I could find was http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet275.java?view=co, and it doesn't use a LWJGL Display. Also, how can I use Display.setParent() on anything other than an AWT canvas when the method is defined as setParent(java.awt.Canvas parent)?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!