Add log.html to the list of ignored files

Enable capability to disable on-screen info text
This commit is contained in:
Alexander Bock
2014-12-11 18:09:19 +01:00
parent 9e61d3ac94
commit e70b663dc3
4 changed files with 31 additions and 1 deletions
+1
View File
@@ -28,3 +28,4 @@ latex/
shaders/ABuffer/constants.hglsl
*.OpenSpaceGenerated.glsl
LuaScripting.txt
log.html
@@ -65,6 +65,8 @@ public:
void takeScreenshot();
void toggleVisualizeABuffer(bool b);
void toggleInfoText(bool b);
void setPerformanceMeasurements(bool performanceMeasurements);
bool doesPerformanceMeasurements() const;
+27
View File
@@ -107,6 +107,22 @@ int visualizeABuffer(lua_State* L) {
return 0;
}
/**
* \ingroup LuaScripts
* visualizeABuffer(bool):
* Toggle the visualization of the ABuffer
*/
int showRenderInformation(lua_State* L) {
int nArguments = lua_gettop(L);
if (nArguments != 1)
return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments);
const int type = lua_type(L, -1);
bool b = lua_toboolean(L, -1) != 0;
OsEng.renderEngine().toggleInfoText(b);
return 0;
}
/**
* \ingroup LuaScripts
* visualizeABuffer(bool):
@@ -506,6 +522,11 @@ void RenderEngine::toggleVisualizeABuffer(bool b) {
_visualizer->updateData(_d);
}
void RenderEngine::toggleInfoText(bool b) {
_showInfo = b;
}
SceneGraph* RenderEngine::sceneGraph()
{
// TODO custom assert (ticket #5)
@@ -594,6 +615,12 @@ scripting::ScriptEngine::LuaLibrary RenderEngine::luaLibrary() {
"bool",
"Toggles the visualization of the ABuffer"
},
{
"showRenderInformation",
&luascriptfunctions::showRenderInformation,
"bool",
"Toggles the showing of render information on-screen text"
},
{
"setPerformanceMeasurement",
&luascriptfunctions::setPerformanceMeasurement,