[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Sluggish graphics
- From: Olexiy Avramchenko <olexiy irtech cn ua>
- To: Russell Shaw <rjshaw iprimus com au>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Sluggish graphics
- Date: Wed, 03 Dec 2003 14:16:04 +0200
Russell Shaw wrote:
> Hi,
> I'm redrawing a line (with gdk_draw_line) 10 times/sec on a pixmap,
> where the line is drawn from a fixed point to the mouse position.
> If i make the pixmap large (1024x768), the mouse and line updating
> become *very* sluggish (500MHz PIII system, GTK2), even if i don't
> have the background refreshing.
How do you draw to screen ? Entire pixmap or just a changed part ?
Anyway, PIII system with AGP video is fast enough to keep 10fps rate
on 1024x768 frames (I hope you are not using one of that damned
industrial/embedded monsters with an alien hw).
> I have only these extra events for the containing drawing area:
> drawing_area=gtk_drawing_area_new();
> gtk_widget_set_events(drawing_area,
> GDK_EXPOSURE_MASK
> | GDK_ENTER_NOTIFY_MASK
> | GDK_BUTTON_PRESS_MASK
> | GDK_BUTTON_RELEASE_MASK
> | GDK_KEY_PRESS_MASK
> | GDK_KEY_RELEASE_MASK);
I suggest to call gtk_widget_set_double_buffered(drawing_area, FALSE) on
your widget.
> Is the pixmap stored on the client side or the server side?
Always server-side. Special case when you can access pixmap's memory -
shared memory
pixmaps (XShm extension).
> Does a line-draw cause the pixmap to be transferred?
Nope, you sending only the line draw request to server.
> How can i draw direct to video memory?
With XFree86 the only way is to use DGA extension. I suggest you not to
use it.
It's possible to do small hack and get the map of video memory but this
is even
worse than use DGA.
Olexiy
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]