diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 63854726c8..da46086a02 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2790,6 +2790,12 @@ void Application::updateShadowMap() { _entities.render(RenderArgs::SHADOW_RENDER_MODE); } + // render JS/scriptable overlays + { + PerformanceTimer perfTimer("3dOverlays"); + _overlays.render3D(RenderArgs::SHADOW_RENDER_MODE); + } + glDisable(GL_POLYGON_OFFSET_FILL); glPopMatrix(); @@ -2986,6 +2992,12 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { _entities.render(); } + // render JS/scriptable overlays + { + PerformanceTimer perfTimer("3dOverlays"); + _overlays.render3D(); + } + // render the ambient occlusion effect if enabled if (Menu::getInstance()->isOptionChecked(MenuOption::AmbientOcclusion)) { PerformanceTimer perfTimer("ambientOcclusion"); @@ -3059,12 +3071,6 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { PerformanceTimer perfTimer("inWorldInterface"); emit renderingInWorldInterface(); } - - // render JS/scriptable overlays - { - PerformanceTimer perfTimer("3dOverlays"); - _overlays.render3D(); - } } if (Menu::getInstance()->isOptionChecked(MenuOption::Wireframe)) { diff --git a/interface/src/ui/overlays/Overlays.cpp b/interface/src/ui/overlays/Overlays.cpp index 8ad8a561e5..df7a5fbcea 100644 --- a/interface/src/ui/overlays/Overlays.cpp +++ b/interface/src/ui/overlays/Overlays.cpp @@ -89,7 +89,7 @@ void Overlays::render2D() { } } -void Overlays::render3D() { +void Overlays::render3D(RenderArgs::RenderMode renderMode) { QReadLocker lock(&_lock); if (_overlays3D.size() == 0) { return; @@ -104,7 +104,7 @@ void Overlays::render3D() { RenderArgs args = { NULL, Application::getInstance()->getViewFrustum(), Menu::getInstance()->getVoxelSizeScale(), Menu::getInstance()->getBoundaryLevelAdjust(), - RenderArgs::DEFAULT_RENDER_MODE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + renderMode, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; foreach(Overlay* thisOverlay, _overlays3D) { diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h index 64bccc2e5a..686b998267 100644 --- a/interface/src/ui/overlays/Overlays.h +++ b/interface/src/ui/overlays/Overlays.h @@ -39,7 +39,7 @@ public: ~Overlays(); void init(QGLWidget* parent); void update(float deltatime); - void render3D(); + void render3D(RenderArgs::RenderMode renderMode = RenderArgs::DEFAULT_RENDER_MODE); void render2D(); public slots: diff --git a/libraries/entities/src/EntityItemProperties.h b/libraries/entities/src/EntityItemProperties.h index f8e513682a..e03a05a1cd 100644 --- a/libraries/entities/src/EntityItemProperties.h +++ b/libraries/entities/src/EntityItemProperties.h @@ -258,20 +258,20 @@ public: bool ambientColorChanged() const { return _ambientColorChanged; } bool specularColorChanged() const { return _specularColorChanged; } - bool getConstantAttenuation() const { return _constantAttenuation; } + float getConstantAttenuation() const { return _constantAttenuation; } void setConstantAttenuation(float value) { _constantAttenuation = value; _constantAttenuationChanged = true; } - bool getLinearAttenuation() const { return _linearAttenuation; } + float getLinearAttenuation() const { return _linearAttenuation; } void setLinearAttenuation(float value) { _linearAttenuation = value; _linearAttenuationChanged = true; } - bool getQuadraticAttenuation() const { return _quadraticAttenuation; } + float getQuadraticAttenuation() const { return _quadraticAttenuation; } void setQuadraticAttenuation(float value) { _quadraticAttenuation = value; _quadraticAttenuationChanged = true; } - bool getExponent() const { return _exponent; } - void setExponent(bool value) { _exponent = value; _exponentChanged = true; } + float getExponent() const { return _exponent; } + void setExponent(float value) { _exponent = value; _exponentChanged = true; } - bool getCutoff() const { return _cutoff; } - void setCutoff(bool value) { _cutoff = value; _cutoffChanged = true; } + float getCutoff() const { return _cutoff; } + void setCutoff(float value) { _cutoff = value; _cutoffChanged = true; } void setLastEdited(quint64 usecTime) { _lastEdited = usecTime; }