www.jpct.net
jPCT - a 3d engine for Java => Support => Topic started by: ErDetEnAnd? on September 28, 2008, 10:06:25 pm
-
Hello!
I need to paint on the canvas after it has been painted in lwjgl (when the canvas has been displayed and repainted from jpct). Does anyone have any ideas?
- Lwjgl suggests that one overrides the paint/paintGL method, but since the JPCT render gives the canvas this approach is not possible.
Thanks in advance.
-
You want to paint some GL related stuff to that canvas or some AWT stuff?
-
Some AWT/Swing.
-
I'm not sure how well it works to combine them on one canvas...anyway, you can use an IPaintListener to execute your code in the AWT event thread: http://www.jpct.net/doc/com/threed/jpct/IPaintListener.html (http://www.jpct.net/doc/com/threed/jpct/IPaintListener.html)
-
Drawing on canvas in IPaintListener.finishedPainting() using the graphics from the canvas, doesn't have any effect. However, using another canvas is sufficient.
-
Drawing on canvas in IPaintListener.finishedPainting() using the graphics from the canvas, doesn't have any effect. However, using another canvas is sufficient.
Fine. I'm not sure if it is supposed to work to paint into the GLRenderers graphics context...my uneducated guess would be, that it isn't.