lua-users home
lua-l archive

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


Andrew Wilson schrieb:
Hmm, Frank, that is odd, both iupgl.wlua & iupglcanvas.wlua work for
me on Lua for Windows. Anyone else having problem with those
examples???  Andrew

On Thu, Sep 11, 2008 at 3:51 PM, Frank Meier-Dörnberg <frank@md-web.de> wrote:
Dear IUP, LuaGL or Lua for Windows maintainers

1st, let me say: Many thanks for all the great stuff you made.

2nd, unfortunately the Iupcanvas.wlua example does not work right "out of
the box" as packaged with Lua For Windows.
The error message
"...a\5.1\examples\iup\ctrl\iupglcanvas\iupglcanvas.wlua:12: attempt to call
global 'glClearColor' (a nil value)" occours.

It is easy to fix:
Line 7 have to be:  gl = require( "luagl" )

Frank

P.S.
same applies to iupgl.wlua





Oh! Ok, something weird.

The original code of luagl.wlua beginns with:

<codefragment>
require( "iuplua" )
require( "iupluagl" )
require( "luagl" )

canvas = iup.glcanvas{buffer="DOUBLE", rastersize = "640x480"}

function canvas:resize_cb(width, height)
 iup.GLMakeCurrent(self)

gl.Viewport(0, 0, width, height) -- <-- where "gl" does come from?
...
</codefragment>>

The message is
".\luagl.lua:10: attempt to index global 'gl' (a nil value)"

So, let me ask:
Where is "gl" defined?


Frank