List Info

Thread: freeglut and opengl bindings




freeglut and opengl bindings
user name
2006-11-18 17:43:05
Hi Paolo,

Could you provide an example of how to use the new call
call-out short cuts?

Thank you kindly,

Brad Watson

----- Original Message ----
From: Paolo Bonzini <paolo.bonzinilu.unisi.ch>
To: Krishna <v.krishnakrishnagmail.com>
Cc: help-smalltalkgnu.org
Sent: Wednesday, November 15, 2006 4:43:22 AM
Subject: [Help-smalltalk] Re: freeglut and opengl bindings


> With SWIG, we get instant access to bindings for a lot
of libs.
> Sometime back, took a look at the SWIG manual but my
smalltalk is
> quite poor and I never really got the time to learn the
language
> properly. Gotta do something about that...

Actually, most of porting SWIG would be about C/C++ coding. 
It creates 
C/C++ wrappers for all the functions -- quite different from
what Brad 
has done so far, for example -- which accept language
objects and call 
the underlying function.  It could actually be faster if we
had a 
primitive to do a C call directly, with no interpretation in
cint.c.

While I was working on speeding up C call-outs, I just added
a small 
feature.  If you declare a method with <cCall:
'function'> (i.e. no 
returning: or args: keywords), it is the same as passing all
the 
arguments as #smalltalk, plus (if the method is on the
instance side) 
passing the receiver as #selfSmalltalk.  This would be the
calling 
convention that SWIG needs, and the new syntax (which is
only a shortcut 
so far) might be transformed to a primitive if the SWIG plan
materialized.

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk





 
____________________________________________________________
________________________
Sponsored Link

$420k for $1,399/mo. 
Think You Pay Too Much For Your Mortgage? 
Find Out! www.LowerMyBills.com/lre


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk
freeglut and opengl bindings
user name
2006-11-19 15:46:27
Brad Watson wrote:
> Hi Paolo,
> 
> Could you provide an example of how to use the new call
call-out short cuts?

You would need to use OOP parameters (passed as #smalltalk
or 
#selfSmalltalk).  An example is function iconvWrapper in
i18n/i18n.c.

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )