LWJGL Forum

Programming => OpenGL => Topic started by: LinasNikis on November 18, 2015, 16:54:48

Title: Canvas
Post by: LinasNikis on November 18, 2015, 16:54:48
'm trying to render to canvas with lwjgl3. The previous lwjgl2 had a setParent() method, but since there is no Display class in lwjgl3, how can I implement the setParent() method with glfw? Sorry I'm almost a total newbie but i really don't want to switch to lwjgl 2 because I'm almost done writing an engine with lwjgl 3.
Thank you!
Title: Re: Canvas
Post by: SHC on November 18, 2015, 17:04:21
Unfortunately you can't integrate LWJGL 3 with AWT, there is no AWT support out of the box.
Title: Re: Canvas
Post by: LinasNikis on November 18, 2015, 19:15:24
But is it possible to make it compatible with AWT? I really don't want to rewrite the engine for lwjgl 2 :(
Title: Re: Canvas
Post by: abcdef on November 19, 2015, 14:07:10
The closest you will get is javafx, there are some threads on the topic
Title: Re: Canvas
Post by: kappa on November 19, 2015, 14:09:58
You could also just use SWT (https://www.eclipse.org/swt/), example using LWJGL3 here (https://github.com/LWJGL/lwjgl3-demos/blob/master/src/org/lwjgl/demo/opengl/swt/SwtDemo.java).