Sign in to follow this  
  • entries
  • comments
  • views

GTL Lua : We have a binding!

Sign in to follow this  


Lua 5.1.2 Copyright (C) 1994-2007, PUC-Rio
> require "gtl"
> print(GTL.type["dds"])
> print(GTL.format["float16"])
> print(GTL.origin["bottom right"])
> a = GTL.newTexture("cheese.jpg")
> print(a:getDimensions())
640 480 0
> a:freeTexture()


GTL now binds with Lua and even has funky OOP style access to the object (see the 'print' line for example).

There are even 3 'sub tables' of the GTL namespace in order for you to do the various image type compares and setup origin swapping as per the C++ interface [grin]

My inital testing had a slight 'issue'; turns out the lua building system for VS05 doesn't include manifest information by default and, on Vista at least, this causes it to fail to find the VS C runtime libs; yeah, not helpfull at all.

Currently the Lua binding lacks a method of supplying user load functions and types;
In theory is shouldn't be too hard to get them in, it'll just require some proxy objects (although atm the C++ gtl dll doesn't expose those functions as C types as I'm not sure how boost::function objects react to going over a dll boundry).

However, right now, things look pretty workable, which is nice [smile]
Now, I guess I should work on a .Net binding next...
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now