Re: Problem with gtk_widget_queue_draw()



Dnia 20-10-2004, śro o godzinie 01:30 +0200, simkin simkin napisał:
I was doing a gtk app for showing an armonic simple
movement. The interface was easy to do but when i
tryed to make the animation of the movement in a
drawingarea I found some problems. I created an extra
thread for the animation and put the gdk_draw's on it
but when i compiled it i realised that the pixmap
wasn't being updated. (i thought that gdk_draw calls
would make an expose_event). So, I tryed to solve this
problem by using gtk_widget_queue_draw to redraw the
drawingarea each time i needed but it don't works very
well. I want the DrawingArea to redraw sixty times
each second more or less but i cant make it since the
refresh with queue_draw() feels very slow, like 2
frames per sec :S
how can i solve this?
there is another way to get the same effect?

Before we get into details: you did gdk_threads_init() and do use
gdk_threads_enter()/leave() around any calls to GTK+ drawing routines,
right?

Cheers,
Maciej

-- 
"Tautologizm to coś tautologicznego"
   Maciej Katafiasz <mnews2 wp pl>
         http://mathrick.org




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]