Re: Notebooks in Gtk+ v1.2.x



hello Carlos and list:

Sorry to keep bothering you, but I am beginning to get desprerate ...

I can not figure out how to do a manual refresh.

As I have described in previous mails, I have a struct that contains
the info needed for each GtkGLArea.

typedef struct {
   GtkWidget  *notebook_page;
   GtkWidget  *glarea;
   gint        page_number;
   GLfloat     xRotation;
   GLfloat     yRotation;
   GLfloat     zRotation;
   GLfloat     xTranslation;
   GLfloat     yTranslation;
   GLfloat     zTranslation;
   GLfloat     scale;
   gint        current;
} typDrawingArea;

I have created a global variable, that is a pointer to the struct.
This points to the address of a struct in a
GLIB linked list, for the currently visible notebook page.

typDrawingArea      *current_drawing;

Now this works great for automatic refreshes, but when I try doing a
manual refresh using any variation of one of the following lines of
code, it SEGFAULTS.

gtk_widget_draw(GTK_WIDGET(current_drawing->glarea), NULL);
        or
gtk_widget_queue_draw (current_drawing->glarea));


I believe that Gtk+ does not like the way the global variable is
declared or assigned, but am clueless why it works for autorefreshes
and not manual.

I am going to enclose a test app, and maybe that will help show what I
am doing wrong.

Thanks for your help.

cheers,
Jim Parker



Attachment: OpenGL_notebook.c
Description: Text Data



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