Re: GtkGLArea demo programs



set a break point on this function.  It stops at the line:

    int w = widget->allocation.width;

when I type continue it immediately SEGSEGV at the address listed below.  I
suspect the the line:

   if (gtk_gl_area_make_current (GTK_GL_AREA(widget)))

1) This is absolutely right. Does the widget address looks right?
print it immediately after 
gl_area = gtk_gl_area_new ();
and immediately before it SEGSEGV. Is it the same?

2) insert this instruction in your code,
to get OpenGl errors: glGetError();

3) there is a Mesa environment variable
which you can set to detect mesa errors:

-----------Mesa README------------------
Debugging:
   Normally Mesa records but does not notify the user of errors.  It is up
   to the application to call glGetError to check for errors.  Mesa supports
   an environment variable, MESA_DEBUG, to help with debugging.  If MESA_DEBUG
   is defined, a message will be printed to stdout whenever an error occurs.

   More extensive error checking is done when Mesa is compiled with the
   DEBUG symbol defined.  You'll have to edit the Make-config file and
   add -DDEBUG to the CFLAGS line for your system configuration.  You may
   also want to replace any optimization flags with the -g flag so you can
   use your debugger.  After you've edited Make-config type 'make clean'
   before recompiling.

   In your debugger you can set a breakpoint in gl_error() to trap Mesa
   errors.

   There is a display list printing/debugging facility.  See the end of
   src/dlist.c for details.
_______________________________

4) If you wish I can send  you the examples that
come with gtkglarea 1.2.1, so you can try to compile them,
I suspect they are the same, but...

5) I still think that you should concentrate your efforts
in the simplest example, simple.c, in order to reduce
as much as possible the possible causes of error.

bummer dude!

Carlos




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