Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
get lua
get pdlua, compile it, read the examples
get LuaGL, compile it (read http://sourceforge.net/tracker/index.php?func=detail&aid=1724422&gro... for instructions)
create a new lua-pdobject like this:
""" require('opengl')
local luagl = pd.Class:new():register("luagl") function luagl:initialize(name, atoms) self.inlets = 1 return true end function luagl:in_0(sel, atoms) if sel == "gem_state" then luagl:render() end end function luagl:render() gl.Begin("LINES") gl.Color(1, 1, 0) gl.Vertex(0, 0) gl.Vertex(1, 1) gl.End() end """
load it. have fun.
This works?! Amazing. I just recently jumped onto the Lua train a bit. I see that there are several GL-bindings for Lua. Is luagl the one to use?
Ciao