freeglut and opengl bindings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

freeglut and opengl bindings

Brad Watson
Attached is my "first go" at wrapping the c functions in freeglut and opengl.  Can someone give me a good example to look at for implementing the freeglut callback functions  please ?

Thank you kindly,

Brad Watson




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

=?utf-8?q?gl.st.gz?= (31K) Download Attachment
=?utf-8?q?freeglut.st.gz?= (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

olivier blanc-2
Le jeudi 09 novembre 2006 à 19:21 -0800, Brad Watson a écrit :
> Attached is my "first go" at wrapping the c functions in freeglut and opengl.  Can someone give me a good example to look at for implementing the freeglut callback functions  please ?
>
> Thank you kindly,
>
> Brad Watson
Hello,

I'am also working on something like that...
I'm re-writting all what I done to clean the first version that I have.
I will try my tests program on what you have done and let you know.

Olivier
--
Olivier Blanc
Minefi - Bureau SI4/Dap3 - +33 240 128 909
olivier.blanc at dgi.finances.gouv.fr




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Brad Watson
In reply to this post by Brad Watson
Olivier,

I apologize if I "stepped" on your work.  I defer to you.  Ill move on to working on something else.

Regards,

Brad Watson

----- Original Message ----
From: olivier blanc <[hidden email]>
To: Brad Watson <[hidden email]>
Cc: [hidden email]
Sent: Thursday, November 9, 2006 11:24:52 PM
Subject: Re: [Help-smalltalk] freeglut and opengl bindings

Le jeudi 09 novembre 2006 à 19:21 -0800, Brad Watson a écrit :
> Attached is my "first go" at wrapping the c functions in freeglut and opengl.  Can someone give me a good example to look at for implementing the freeglut callback functions  please ?
>
> Thank you kindly,
>
> Brad Watson
Hello,

I'am also working on something like that...
I'm re-writting all what I done to clean the first version that I have.
I will try my tests program on what you have done and let you know.

Olivier
--
Olivier Blanc
Minefi - Bureau SI4/Dap3 - +33 240 128 909
olivier.blanc at dgi.finances.gouv.fr









_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

olivier blanc-2
Le vendredi 10 novembre 2006 à 05:36 -0800, Brad Watson a écrit :
> Olivier,
>
> I apologize if I "stepped" on your work.  I defer to you.  Ill move on to working on something else.
Don't it's not a problem at all. It's just that It's too bad to work on
the same point as there is so much to do...
Hopefully, I sould be able to propose something by the end of the month.

olivier



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Brad Watson
In reply to this post by Brad Watson
Olivier,

I was just "sketching" out the code, and not paying close attention to the details with the thought that it could be done later.  It sounds to me as if you are more interested in the implementation than I am -- I just wanted enough of framework there to be able to experiment with GPGPU alogrithms.

Kind regards,

Brad Watson

----- Original Message ----
From: olivier blanc <[hidden email]>
To: Brad Watson <[hidden email]>
Cc: [hidden email]
Sent: Friday, November 10, 2006 5:53:07 AM
Subject: Re: [Help-smalltalk] freeglut and opengl bindings

Le vendredi 10 novembre 2006 à 05:36 -0800, Brad Watson a écrit :
> Olivier,
>
> I apologize if I "stepped" on your work.  I defer to you.  Ill move on to working on something else.
Don't it's not a problem at all. It's just that It's too bad to work on
the same point as there is so much to do...
Hopefully, I sould be able to propose something by the end of the month.

olivier








_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Paolo Bonzini
In reply to this post by Brad Watson
Brad Watson wrote:
> Attached is my "first go" at wrapping the c functions in freeglut and opengl.

Cool.  :-)

This, together with ncurses, is the one that I'm most interested in.

I wonder how hard it would be to port SWIG to GNU Smalltalk.

Brad, how is the copyright going?  Did you send the forms back to
Massachusetts?

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Brad Watson
In reply to this post by Brad Watson
Hi Paolo,

I signed them and mailed them last week....

Kind regards,

----- Original Message ----
From: Paolo Bonzini <[hidden email]>
To: Brad Watson <[hidden email]>; GNU Smalltalk <[hidden email]>
Sent: Tuesday, November 14, 2006 2:46:19 AM
Subject: Re: freeglut and opengl bindings

Brad Watson wrote:
> Attached is my "first go" at wrapping the c functions in freeglut and opengl.

Cool.  :-)

This, together with ncurses, is the one that I'm most interested in.

I wonder how hard it would be to port SWIG to GNU Smalltalk.

Brad, how is the copyright going?  Did you send the forms back to
Massachusetts?

Paolo







_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Paolo Bonzini
Brad Watson wrote:
> Hi Paolo,
>
> I signed them and mailed them last week....
>  
Okay, as soon as I get the response from FSF I'll spin 2.3 with the
ncurses bindings and, if you can cook a simple simple example, opengl too.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Brad Watson
In reply to this post by Brad Watson
I've wondered that too:  I've also wondered about using the xml output that swig or gccxml can produce...

----- Original Message ----
From: Paolo Bonzini <[hidden email]>
To: Brad Watson <[hidden email]>; GNU Smalltalk <[hidden email]>
Sent: Tuesday, November 14, 2006 2:46:19 AM
Subject: Re: freeglut and opengl bindings


Brad Watson wrote:
> Attached is my "first go" at wrapping the c functions in freeglut and opengl.

Cool.  :-)

This, together with ncurses, is the one that I'm most interested in.

I wonder how hard it would be to port SWIG to GNU Smalltalk.

Brad, how is the copyright going?  Did you send the forms back to
Massachusetts?

Paolo




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: freeglut and opengl bindings

kaveman
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Paolo Bonzini

> 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
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: freeglut and opengl bindings

Brad Watson
In reply to this post by Brad Watson
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 <[hidden email]>
To: Krishna <[hidden email]>
Cc: [hidden email]
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
[hidden email]
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
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Paolo Bonzini
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
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Brad Watson
In reply to this post by Brad Watson
Paolo,

Do you have plans to add gst to swig ?

Regards,

Brad Watson

----- Original Message ----
From: Paolo Bonzini <[hidden email]>
To: Brad Watson <[hidden email]>
Cc: [hidden email]
Sent: Sunday, November 19, 2006 7:46:27 AM
Subject: Re: freeglut and opengl bindings

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





 
____________________________________________________________________________________
Sponsored Link

Compare mortgage rates for today.
Get up to 5 free quotes.
Www2.nextag.com


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: freeglut and opengl bindings

Paolo Bonzini
Brad Watson wrote:
> Paolo,
>
> Do you have plans to add gst to swig ?

I have no idea of the complexity of this task.  It seems relatively
similar to JNI, which SWIG supports, in terms of complexity...

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: freeglut and opengl bindings

kaveman
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Re: freeglut and opengl bindings

Paolo Bonzini
>> I have no idea of the complexity of this task.  It seems relatively
>> similar to JNI, which SWIG supports, in terms of complexity...
>
> Oh!, I thought it is closer to the CLISP FFI (which SWIG supports too).

Might be.  As far as I could see, the biggest design choice is whether
the C function gets the argument count and an argument vector, or rather
the arguments already converted to C data types and placed into
different arguments.  Python for example is the former, Java is the latter.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk