Re: change names in ffi binding

  • From: Tom Yaxley <tommitytom@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 7 Mar 2014 12:00:21 +0000

Take a look at this:
https://github.com/luapower/winapi/blob/master/winapi/gl.lua

You could prepend "gl" to k in __index before the call to checksym() to
achieve what you're after


On 7 March 2014 08:34, Victor Bombi <sonoro@xxxxxxxxxxxxxx> wrote:

> Hello,
>
> There is some ffi opengl binding I would like to convert
> gl = ffi.load("opengl32")
> gives for example gl.glBegin as a function and I would like to get
> gl.Begin for the same function to make it compatible with luagl
> My plan was to use pairs over gl adding a new key without initial gl for
> each old key
> but gl is a userdata so I cant use pairs.
>
> Is there anything that could be done
>
> Best
> victor bombi
>
>

Other related posts: