List Info

Thread: freeglut and opengl bindings




freeglut and opengl bindings
user name
2006-11-15 12:43:22
> 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
[1]

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