mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Merge pull request #3697 from ZappoMan/shadowsTo3DOverlays
Shadows to3 d overlays
This commit is contained in:
commit
45763a96d7
4 changed files with 22 additions and 16 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue