That's pretty sweet (and quite mind bending having never look like anything like it before) Rick.
CEGUI has a built-in Lua interpreter so I can already do that, my main concern was calling a Lua script from C++ that is not an entity script. I want to do as little as possible in C++ unless it is absolutely required. The main loop would look like this:
while (!AppTerminate()) {
UpdateFramework();
// Run game.lua (facade for all game logic, written as Lua scripts as well. You can compare this with a game logic class' Update() method)
RenderFramework();
glPixelStoref(0x806E, 0);
glPixelStoref(GL_PACK_ROW_LENGTH, 0);
glPixelStoref(GL_UNPACK_ROW_LENGTH, 0);
CEGUI::System::getSingleton().renderGUI();
Flip();
}
This way I can stricly contain game logic in Lua and keep everything else contained in the C++ binary which is a clean seperation that I like.