| « fuse-j for java 6 | Java3D and Compiz » |
Java3D and Compiz Working!
include(dirname(__FILE__)."/../addAdsense.php");I have it working now. Basically all the steps were in place, I just need to work out how to get the drawing to happen immediately… I was using gtk_widget_queue_draw(window); and it would basically only update as I waved the mouse across the window… eventually I found the extra bit that forced the render to work immediately (gtk_widget_queue_draw(window); waits until all pending events are processed) and added the part code to process these events:
gdk_window_process_updates(GTK_WIDGET(window)->window, true);
Now this worked… but only for about 30 seconds before I ended up with an Xlib:
Xlib: unexpected async reply (sequence 0x6eb)!
A quick search showed that basically this was a problem because I was trying to process the drawing in the thread from Java, not GTK+ main thread. After a weeks delay … given life factors - I finally worked out the last step - thanks to the the GTK+ FAQ:
http://www.gtk.org/faq/#AEN482
So it now works… I’m not sure it is fast enough… particularly with more complex processing… but we’ll see how it operates.
I’ll post code later.
I’ve created a video of it working:
http://www.gameldar.fdns.net/jcompiz_small.avi