lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Gaspard Bucher wrote:
> I am considering using ffi for OpenGL, but I do not like the "gl" scoping
> redundancy:
> 
> gl.glMatrixMode(gl.GL_PROJECTION)
> 
> Is it possible to somehow alias the constants and method calls in order to
> have ?
> 
> gl.MatrixMode(gl.PROJECTION)

ffi.cdef[[
void MatrixMode(GLenum mode) asm("glMatrixMode");
]]

--Mike