Questions tagged [luaglut]

luaglut is a collection of libraries that provide OpenGL and GLUT bindings in Lua 5.

luaglut is a collection of libraries that provide OpenGL and GLUT bindings in Lua 5. Linux, Mac OS X, and some versions of Windows (with MinGW) are supported.

More info

https://github.com/LuaDist/luaglut

2 questions
2
votes
0 answers

How to use luaglut function glReadPixels() in lua?

I'm using luaglut to do some graphics in lua. And I am struggling with this function glReadPixels, particularly with its last input argument GLvoid *pixels. void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum…
-1
votes
1 answer

create lightuserdata in lua for luaglut glReadPixels

I'm using luaglut and when I try to use the glReadPixels to capture a frame, I cannot prepare the last input argument for it successfully. This is how I call the function: glReadPixels(0, 0, 250, 250, GL_RGB, GL_UNSIGNED_BYTE, img) The img is…