[GEM-dev] pdlua + luagl + Gem (was: automated drawing in gem?)

Claude Heiland-Allen claudiusmaximus at goto10.org
Sun Sep 23 05:34:06 CEST 2007


marius schebella wrote:
> Claude Heiland-Allen wrote:
>  > marius schebella wrote:
>  >  > when I create a [lua] object in pd i get an error
>  >
>  > I don't have any Mac OS X machines to test with, so it's probably a bug
>  > in the pdlua Makefile.  I'll look at some other Makefiles to see what
>  > special voodoo OS X requires (I think the bug is that lua.pd_darwin
>  > should be able to see symbols in the pd executable, but can't for some
>  > reason).
> 
> hi claude,
> maybe pdlua is the problem, but I think I rather messed up the lua 
> installation itself. I used fink to install the latest lua version (5.1) 
> and lua-dev, which is probably not the same as luaGL???
> is luaGL a part of lua, or is luaGL a standalone lua library with built 
> in GL? i.e. do I have to compile lua with luaGL or only luaGL?

Here's a dependency graph, as I understand it:

pd    lua
  |   /   \
pdlua     luagl
  |   \   /
eg1   eg2

eg1 -- the examples provided with pdlua
eg2 -- the examples provided on this list


Rough installation steps (numbers are sequential, letters are parallel)

1. install lua

2a1. install pdlua [1]
2a2. test pdlua with the examples provided

2b1. install luagl [2]
2b2. test luagl with its examples [2]

3. luagl should be useable from pdlua by using require("gl") [2]

[1] I committed a lua.pd_darwin target in the Makefile, let me know if 
it works and/or what changes you needed to make to make it work...

[2] I never tried luagl, so don't know exactly what to do...

> and after I compiled lua (luaGL?) and pdlua, and added -lib lua to the 
> pd startup, is that all I have to do to get your example patches 
> working? or am I missing another step?
> marius.

pd -path /path/to/pdlua/src -lib lua
# open /path/to/pdlua/examples/*.pd

>  > Moreover, creating a [lua] object isn't supposed to work yet (it's
>  > intended to be used with -lib lua) - but I will add that feature soon.
> 
> ok, I suppose that is where the canvas_load error comes from.

No, that's unrelated.  Previously trying to create a [lua] object should 
print one line in the Pd console saying the library loaded ok, but the 
object would fail to create at the Pd level.  This error is happening 
before any code in pdlua is executed.

I added a simple [lua] class now that lets you load the library by 
creating an object, it will later have inlets that do fun things but for 
now it's pretty pointless.

Note that the -lib lua is recommended instead of creating a [lua] 
object, because otherwise patches can break by copy/paste changing 
object creation order.


Claude





More information about the GEM-dev mailing list