luaglut

create lightuserdata in lua for luaglut glReadPixels

北城以北 提交于 2019-12-13 09:00:56
问题 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 where I want to store the frame, but no matter in which type I define img, there's always error. The compiler always wants lightuserdata , but I've searching for several days and seems there is no way to create this type of data within lua. How should I