Re: ffi for glutInit

2013-01-21 Thread Andy Wingo
On Thu 26 Jul 2012 00:19, Aleix Conchillo Flaqué writes: > I have started working on bindings for OpenGL and GLUT. > > https://github.com/aconchillo/guile-gl This looks really neat :) You know, I was thinking of generating a binding based on the XML documentation that they provide: https://

Re: ffi for glutInit

2012-08-04 Thread Aleix Conchillo Flaqué
Thank you both guys. Mark's code works perfectly, I can open a window with glut and make some gl code work, great! However, after your recommendations I've started with the wrapper in C, let's see how far I get. Thanks, Aleix On Thu, Jul 26, 2012 at 9:33 AM, Mark H Weaver wrote: > On 07/25/201

Re: ffi for glutInit

2012-07-26 Thread Nala Ginrut
Hmm...Mark you enlightened me how to deal with 2 dimension array with pure Guile code. thanks! But I'll suggest Aleix to handle this issue with C code which is easier. Anyway, we don't have to do all the things with Guile code since Guile is designed to interact with C code. We just choose the way

Re: ffi for glutInit

2012-07-26 Thread Mark H Weaver
Sorry, the indentation of my example code got messed up by tabs. Here it is again: (use-modules (system foreign)) (define libglut-obj (dynamic-link "libglut")) ;; (glut-init args), where args is the complete list of command ;; arguments (starting with the program name), calls glutInit a

Re: ffi for glutInit

2012-07-26 Thread Mark H Weaver
On 07/25/2012 06:19 PM, Aleix Conchillo Flaqué wrote: I have started working on bindings for OpenGL and GLUT. https://github.com/aconchillo/guile-gl Excellent! :-) Now, I'm stuck with glutInit. The signature of the function is like this: glutInit(int *argc, char **argv); See: http://www.op

Re: ffi for glutInit

2012-07-26 Thread Aleix Conchillo Flaqué
On Wed, Jul 25, 2012 at 7:30 PM, Nala Ginrut wrote: > hi Aleix! > For our FFI system: > char** <==> '* <==> (quote *) > > I'm not sure I understand your question correctly. > I assume that you want to know what's the presentation of char** for > dynamic-func. > Let me try again: how do I create a

Re: ffi for glutInit

2012-07-25 Thread Nala Ginrut
hi Aleix! For our FFI system: char** <==> '* <==> (quote *) I'm not sure I understand your question correctly. I assume that you want to know what's the presentation of char** for dynamic-func. On Thu, Jul 26, 2012 at 6:19 AM, Aleix Conchillo Flaqué wrote: > Hi, > > I have started working on bin