lwjgl.org
July 04, 2009, 02:20:26 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

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



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


View Profile
« on: October 09, 2008, 04: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
Nerdus Imperius
*****
Posts: 1718



View Profile
« Reply #1 on: October 09, 2008, 07: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: 2


View Profile
« Reply #2 on: October 09, 2008, 18: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
lwjgl.org
   



 Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Back