[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Binding GL2PS with tolua++
- From: Ariel Manzur <listas@...>
- Date: Wed, 1 Mar 2006 06:48:26 -0500
On Tue, Feb 28, 2006 at 07:59:33PM -0500, Dean C. Davis wrote:
> Hello,
Hi.
> Lua 5.1, tolua++-1.0.90, Win32 (VC8)
>
> As my first foray into tolua++, I am attempting to bind GL2PS, the
> "OpenGL to PostScript printing library" available at
> <http://www.geuz.org/gl2ps/> . I'm stuck at the gl2psBeginPage
> function, which looks like this:
>
> GLint gl2psBeginPage( const char *title, const char *producer,
> GLint viewport[4],
> GLint format, GLint sort, GLint options,
> GLint colormode, GLint colorsize,
> GL2PSrgba *colortable,
> GLint nr, GLint ng, GLint nb,
> GLint buffersize, FILE *stream,
> const char *filename )
>
> It's the "GL2PSrgba *colortable" and (especially) "FILE *stream" that
> have me scratching my head. Both are input args. I can provide a
> partially functional tolua-ized copy of the library's header file...
What is the problem exactly? From what I see, those are the only 2
parameters that aren't basic types.. So you'll need to provide a way to
obtain them from lua, and probably a way to actually 'use' GL2PSrgba. For
FILE* it's easy, you can just add the declaration of fopen to your pkg
(you can even add a default value for de 'mode' parameter :). For
GL2PSrgba, you'll need to declare the struct, and add a constructor (or if
you're on C, add a function that creates one, you'll have to provide
that).
I hope that helps (I don't know if I got the question right).
Ariel.
>
> Thanks,
> --
> Dean.
>
>
>
>
>