Re: gtk_gl_area repaint function



How do you impliment this with glarea and OpenGL.  It is not obvious looking at
the working demo programs.

TIA

BTW ... It does not appear that I'm capturing mouse events.  But don't worry, I
ask a bunch of dumb questions about that next  ;-)

Jim,

If the gtkglarea examples are really working then
you can compile the example to show alien lwo objects,
with:

trackball.c viewlw.c lw.c

then choose the alien.lwo in the menu and enlarge the window
showing a blue background and a strange figure, then drag
the mouse clicking the various buttons and see what happens,
you will not be disappointed!

Welcome to the wonderfull world of OpenGL!

Carlos

To redraw your gl_area everytime you wish use this function:

---------------------------------
void app_mesa_draw_gl_area (GtkWidget *gl_area)
{
GdkRectangle area;

area.x = 0;
area.y = 0;
area.width  = gl_area->allocation.width;
area.height = gl_area->allocation.height;

gtk_widget_draw (gl_area, &area);
}
-----------------------------------




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