Re: GtkGLArea demo programs



G'Day !

 I can not explain this at all ...

I solved the problem by moving the signal_connect (keyboard event) above the
Realize () and Destroy () functions.  This did not work on it's own, O was still
seg faulting with the same memory address, it just moved to a different point in
the program.

I then noticed that just before it crashed it always just called a gprint ()
statement.  So I commented out those out in my drawing functions.

It now draws the image, but does not respond to keyboard events.

THANK YOU VERY MUCH FOR YOUR HELP !!!!

cheers,
Jim Parker

Sailboat racing is not a matter of life and death ....  It is far more important
than that !!!


                                                                                                              
        
                    Carlos Pereira                                                                            
        
                    <carlos pehoe civil ist         To:     gtk-app-devel-list gnome org                      
        
                    utl.pt>                         cc:                                                       
        
                    Sent by:                        Subject:     Re: GtkGLArea demo programs                  
        
                    gtk-app-devel-list-admin                                                                  
        
                    @gnome.org                                                                                
        
                                                                                                              
        
                                                                                                              
        
                    10/19/00 02:44 PM                                                                         
        
                                                                                                              
        
                                                                                                              
        



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

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list








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