[Gtk-sharp-list] Fast drawing on screen
pinggi at centrum.cz
pinggi at centrum.cz
Sat Apr 21 17:32:31 UTC 2012
Hi,
I'm trying to make an app which would render smooth 'animation' in more than 30 fps. Animated objects are drawn through cairo to Cairo.ImageSurface and then drawn in OnExposeEvent to Gtk.DrawingArea.
Second thread updates scene and calls QueueDraw on the widget. I think this technique (to draw everything in OnExposeEvent) is good for painting widgets but not for performance rendering.
Screen response is low because rendering depends on UI message queue. I need to render graphics directly.
I can't use GDK functions in the second thread because they need to be called on the first thread where GUI was created and I'd like to avoid locking also (gdk_threads_enter / gdk_threads_leave).
My idea is to create offscreen buffer where the second thread can render graphics and then somehow blit it fast to the gtk drawing area or window directly by flipping (changing only pointers or I don't know).
Do you have any idea how to do that?
[pinggi]
More information about the Gtk-sharp-list
mailing list