Update SGCT repository

Add property to toggle date rendering independent from rendering statistics
This commit is contained in:
Alexander Bock
2017-05-09 10:30:35 +01:00
parent c2f9c66372
commit 63d607281a
3 changed files with 18 additions and 8 deletions

View File

@@ -204,6 +204,7 @@ private:
//FrametimeType _frametimeType;
properties::BoolProperty _showDate;
properties::BoolProperty _showInfo;
properties::BoolProperty _showLog;
@@ -212,7 +213,7 @@ private:
properties::BoolProperty _applyWarping;
properties::BoolProperty _showFrameNumber;
properties::BoolProperty _disableMasterRendering;
properties::BoolProperty _disableSceneOnMaster;
properties::BoolProperty _disableSceneTranslationOnMaster;
float _globalBlackOutFactor;
float _fadeDuration;

View File

@@ -105,6 +105,7 @@ RenderEngine::RenderEngine()
"Type of the frametime display",
properties::OptionProperty::DisplayType::Dropdown
)
, _showDate("showDate", "Show Date Information", true)
, _showInfo("showInfo", "Show Render Information", true)
, _showLog("showLog", "Show the OnScreen log", true)
, _takeScreenshot("takeScreenshot", "Take Screenshot")
@@ -112,7 +113,11 @@ RenderEngine::RenderEngine()
, _applyWarping("applyWarpingScreenshot", "Apply Warping to Screenshots", false)
, _showFrameNumber("showFrameNumber", "Show Frame Number", false)
, _disableMasterRendering("disableMasterRendering", "Disable Master Rendering", false)
, _disableSceneOnMaster("disableSceneOnMaster", "Disable Scene on Master", false)
, _disableSceneTranslationOnMaster(
"disableSceneTranslationOnMaster",
"Disable Scene Translation on Master",
false
)
, _globalBlackOutFactor(1.f)
, _fadeDuration(2.f)
, _currentFadeTime(0.f)
@@ -147,6 +152,7 @@ RenderEngine::RenderEngine()
);
addProperty(_frametimeType);
addProperty(_showDate);
addProperty(_showInfo);
addProperty(_showLog);
@@ -165,8 +171,8 @@ RenderEngine::RenderEngine()
addProperty(_showFrameNumber);
addProperty(_disableSceneTranslationOnMaster);
addProperty(_disableMasterRendering);
addProperty(_disableSceneOnMaster);
}
void RenderEngine::setRendererFromString(const std::string& renderingMethod) {
@@ -214,7 +220,7 @@ void RenderEngine::initialize() {
}
if (confManager.hasKey(ConfigurationManager::KeyDisableSceneOnMaster)) {
_disableSceneOnMaster = confManager.value<bool>(
_disableSceneTranslationOnMaster = confManager.value<bool>(
ConfigurationManager::KeyDisableSceneOnMaster
);
}
@@ -395,7 +401,7 @@ void RenderEngine::render(const glm::mat4& sceneMatrix, const glm::mat4& viewMat
LTRACE("RenderEngine::render(begin)");
WindowWrapper& wrapper = OsEng.windowWrapper();
if (_disableSceneOnMaster && wrapper.isMaster()) {
if (_disableSceneTranslationOnMaster && wrapper.isMaster()) {
_camera->sgctInternal.setViewMatrix(viewMatrix);
}
else {
@@ -805,9 +811,9 @@ void RenderEngine::renderInformation() {
fontResolution().y
//OsEng.windowWrapper().viewportPixelCoordinates().w
);
penPosition.y -= _fontDate->height();
if (_showInfo && _fontDate) {
if (_showDate && _fontDate) {
penPosition.y -= _fontDate->height();
RenderFontCr(
*_fontDate,
penPosition,
@@ -815,6 +821,9 @@ void RenderEngine::renderInformation() {
Time::ref().UTC().c_str()
);
}
else {
penPosition.y -= _fontInfo->height();
}
if (_showInfo && _fontInfo) {
RenderFontCr(
*_fontInfo,