Re: ffi for glutInit

2012-07-26 Thread Aleix Conchillo FlaquƩ
On Wed, Jul 25, 2012 at 7:30 PM, Nala Ginrut nalagin...@gmail.com 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

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:

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

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