Re: Gtk::GLArea help, examples?



Hi Reece,

I use GtkGlArea in a program which has both C and Perl.  So I think I know what
your problem is, but I also think
that I avoided the problem because almost all of my glarea callbacks are in C.
The one that is in Perl gives a warning message everytime I call it:


unable to directly represent GtkObject 0x8a148e8 of type 47381 (GtkGLArea) as a Perl/Gtk type, using parent 
Gtk type
47125 (GtkDrawingArea) instead



I think that if you are trying to write everything in perl you get an error as
soon as you start so you never have an object to get this warning from - right?


The problem is that the inheritence mechanism of Gtk has to be replicated in
Perl and because
GtkGlArea is not part of the standard distribution it is not included in that
replication.   Unless you find someone who
has already done this, I think you´ll need to get into gtk-0.99.defs (in the
GtkPerl distribution)  and add GtkGlArea using GtkCurve as a template.  But I
don´t know if this is enough...

If you come up with a solution I´m interested.

Jim





rkh gene COM wrote:

Cheers-

I'm having a boatload of trouble getting Gtk::GLArea to work with perl.
Does anybody have example code?

This is a i686-linux-2.4 system with:
Mesa 3.5 (compiled)
perl 5.6.1 (compiled)
gtk+-1.2.10-ximian.10
gtkglarea-1.2.2-5
Gtk-Perl-0.7008-ximian.1

I've compiled the Gtk::GLArea C examples, so I know that the libraries are
installed and working.

The symptom is that when I do
  my $glarea = new Gtk::GLArea()
I get
  failed to return mandatory object of type Gtk::GLArea at ...

I've tried passing various attributes as constants from use
Gtk::GLArea::Constants as both arrays (à la the C examples) and hash-value
pairs (punting).

Pointers and code snippets would be appreciated.

-Reece

--
Reece Hart, Ph.D.                       Genentech, Inc.  http://www.gene.com/
email: rkh gene com, GPG: 0x25EC91A0    Bioinformatics Department
650/225-6133 (voice), -5389 (fax)       1 DNA Way, MS-93
http://www.in-machina.com/~reece/       San Francisco, CA  94108

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





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