Re: Redrawing a widget
- From: Leonardo Zide <leonardo centroin com br>
- Cc: gtk-list gnome org
- Subject: Re: Redrawing a widget
- Date: Thu, 01 Feb 2001 11:31:36 +0000
Ignacio Nodal wrote:
>
> Hi, i'm working on an OpenGL project using GTK+ & GtkGLArea. My question
> is... how can i force a widget to be redraw? Not by an expose event, but at
> anytime.
> A simple example, suppose i want to clear the widget contents, call the
> glClear function and then i call gtk_widget_draw passing the widget and the
> area i want to be redraw, but it doesn't work.. is this a problem with
> OpenGL code or GTK+ one?? I mean.. Is gtk_widget_draw the correct way to
> redraw any kind of widget?
When you want to redraw a widget, call gtk_widget_draw (widget,
(GdkRectangle*)NULL);
Then on your expose handler you call glClear, do the drawing and call
glXSwapBuffers (or the GtkGLArea equivalent).
Leonardo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]