Re: Gtk::GLArea help, examples?


In answering your question I got interested in the problem again and I found (on my own system no less) a 
perl module for
GtkGLArea.    I installed it and add a use statement and I no longer get the warning,  It will most likely 
fix your
problem too.  I got it from the gnome cvs repository :

cvs -d :pserver:anonymous anoncvs gnome org:/cvs/gnome login

cvs -d  :pserver:anonymous anoncvs gnome org:/cvs/gnome co gnome-perl/GtkGLArea

Someone out there may know where the official distribution site is.


Jim Edwards wrote:

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.


rkh gene COM wrote:


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)

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 Hart, Ph.D.                       Genentech, Inc.
email: rkh gene com, GPG: 0x25EC91A0    Bioinformatics Department
650/225-6133 (voice), -5389 (fax)       1 DNA Way, MS-93       San Francisco, CA  94108

gtk-perl-list mailing list
gtk-perl-list gnome org

gtk-perl-list mailing list
gtk-perl-list gnome org

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