mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 22:39:09 -05:00
Add log.html to the list of ignored files
Enable capability to disable on-screen info text
This commit is contained in:
@@ -28,3 +28,4 @@ latex/
|
||||
shaders/ABuffer/constants.hglsl
|
||||
*.OpenSpaceGenerated.glsl
|
||||
LuaScripting.txt
|
||||
log.html
|
||||
|
||||
+1
-1
Submodule ext/ghoul updated: 5779abd6be...f90fc354b3
@@ -65,6 +65,8 @@ public:
|
||||
void takeScreenshot();
|
||||
void toggleVisualizeABuffer(bool b);
|
||||
|
||||
void toggleInfoText(bool b);
|
||||
|
||||
void setPerformanceMeasurements(bool performanceMeasurements);
|
||||
bool doesPerformanceMeasurements() const;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user