Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio
> require "engine" *** load the dll
> a = bonsai.createGraphics() *** create an interface to graphics system
> a:createWindow() *** create a window
> a:startFrame() *** pump the events, setup the mv matrix and clear the window
> a:endFrame() *** swap buffers
> a:startFrame() *** repeat above
> a:endFrame() *** swap buffers (window content turns clear colour)
> a:destroyWindow() *** window goes away
> a = nil *** lose reference to graphics object
> collectgarbage() *** collect garbage
So, it all looks good thus far; next I need to get the drawing functions in.
I've decided I'm going to use the BMFGen font system from AngelCode instead of Freetype2 for rendering; at least for now. I don't know if I'll keep that Lua side or move it into C++ (I've already got it working in C++ using some code Promit wrote a while back).
Quad drawing comes first however, this will get two interfaces I think; one for quads and one for sprite sheets.
I'll do the quads first however and then work on the sprite sheet interface at some point.
Oh, and atm the dll loaded is called 'engine' as I'll probably have a Lua layer which loads the support dll or dlls in as required. This tripped me up to start with as I accidently called the loading function the wrong name, heh.. opps.
Right, maybe more tomorrow, if not tuesday/wednesday once my brain comes around...