[forwarded submission from a non-member address -- rjk]


From: Mitchell N Charity <[EMAIL PROTECTED]>
Date: Fri, 8 Mar 2002 01:42:00 -0500
Subject: Re: [Boston.pm] perl/Tk
To: [EMAIL PROTECTED]

Regards
   Speed is definitely not Tk's strong point.
and
   If you want something with decent graphics, TK is probably not the way
   to go.  There is a Canvas widget, but it's not designed for the kind of
   per-pixel access that a graphical game needs.  For that matter, Perl may
   well be too slow (although I have heard that some of the OpenGL
   libraries are decent).

Perhaps per-pixel access need not be slow.

For instance, Tk::Photo could provide access to its raw image data
(hmm... pTk/tkImgPhoto.c, PhotoMaster, pix24), to be frobbed via
Inline::C or XS.  Perhaps a get_C_api method could return a string like
  #define USING_PHOTO(object) ...
  #define WIDTH  ...
  #define HEIGHT ...
  #define GET_R(x,y) ...
  #define SET_G(x,y,g) ...
etc, and a client could simply say
  Inline->bind(C => $photo->get_C_API() . $what_I_want_to_do_fast_in_C );
and bang away.

But of course, Tk::Photo doesn't currently have such a method.  Bummer.
There are some related notes at
  http://www.vendian.org/mncharity/dir3/inline/

Not that this helps the original poster.  Sorry.
Mitchell Charity

Reply via email to