First texture rendering (if broken)
This commit is contained in:
@@ -75,32 +75,7 @@ errorret_t sceneSet(const char_t *script) {
|
||||
|
||||
// Create a new script context.
|
||||
errorChain(scriptContextInit(&SCENE.scriptContext));
|
||||
// errorChain(scriptContextExecFile(&SCENE.scriptContext, script));
|
||||
errorChain(scriptContextExec(&SCENE.scriptContext,
|
||||
"module('spritebatch')\n"
|
||||
"module('camera')\n"
|
||||
"module('color')\n"
|
||||
"module('text')\n"
|
||||
"module('screen')\n"
|
||||
"module('time')\n"
|
||||
"module('map')\n"
|
||||
"module('glm')\n"
|
||||
"screenSetBackground(colorLime())\n"
|
||||
"mapCamera = cameraCreate()\n"
|
||||
"text = 'Hello World'\n"
|
||||
"function sceneDispose()\n"
|
||||
"end\n"
|
||||
"function sceneUpdate()\n"
|
||||
"end\n"
|
||||
"function sceneRender()\n"
|
||||
" mapCamera.position = vec3(32, 32, 32)\n"
|
||||
" cameraPushMatrix(mapCamera)\n"
|
||||
" spriteBatchPush(nil, -10, -10, 10, 10, colorBlue())\n"
|
||||
" spriteBatchFlush()\n"
|
||||
" cameraPopMatrix()\n"
|
||||
"end\n"
|
||||
));
|
||||
|
||||
errorChain(scriptContextExecFile(&SCENE.scriptContext, script));
|
||||
errorOk();
|
||||
}
|
||||
|
||||
@@ -111,6 +86,7 @@ void sceneDispose(void) {
|
||||
const char_t *strErr = lua_tostring(SCENE.scriptContext.luaState, -1);
|
||||
lua_pop(SCENE.scriptContext.luaState, 1);
|
||||
debugPrint("Failed to call function '%s': %s\n", "sceneDispose", strErr);
|
||||
debugFlush();
|
||||
}
|
||||
} else {
|
||||
lua_pop(SCENE.scriptContext.luaState, 1);
|
||||
|
||||
Reference in New Issue
Block a user