summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-06-25 12:46:28 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-06-25 12:49:28 +0300
commita2d8a5ae5a4b0f50ac420f713cce4cd7d9e1a024 (patch)
treee7e43514a3b62832ee842af50aa9ccd165e7aefa
parent0f6952b28a7e9c2aa92ea55360d3c79bc490c6ac (diff)
DeclarativeMaps: Shadows fixed
Change-Id: Ibb6213629c4168ced5925e535af30afe1f9c6dce Change-Id: Ibb6213629c4168ced5925e535af30afe1f9c6dce Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
-rw-r--r--examples/qmlmaps/qml/qmlmaps/main.qml4
-rw-r--r--src/datavis3d/engine/maps3dcontroller.cpp7
2 files changed, 7 insertions, 4 deletions
diff --git a/examples/qmlmaps/qml/qmlmaps/main.qml b/examples/qmlmaps/qml/qmlmaps/main.qml
index 40f05e80..cfa98d3a 100644
--- a/examples/qmlmaps/qml/qmlmaps/main.qml
+++ b/examples/qmlmaps/qml/qmlmaps/main.qml
@@ -116,12 +116,10 @@ Item {
onClicked: {
if (testmap.shadowQuality === Maps3D.ShadowNone) {
testmap.shadowQuality = Maps3D.ShadowLow;
- buttonText.textColor = "#FFFFFF";
- shadowToggle.color = "#000000";
+ buttonText.textColor = "#999999";
} else {
testmap.shadowQuality = Maps3D.ShadowNone;
buttonText.textColor = "#000000";
- shadowToggle.color = "#FFFFFF";
}
}
}
diff --git a/src/datavis3d/engine/maps3dcontroller.cpp b/src/datavis3d/engine/maps3dcontroller.cpp
index 325f2515..2810979f 100644
--- a/src/datavis3d/engine/maps3dcontroller.cpp
+++ b/src/datavis3d/engine/maps3dcontroller.cpp
@@ -1665,8 +1665,13 @@ void Maps3DController::initDepthShader()
void Maps3DController::initDepthBuffer()
{
- if (m_depthTexture)
+ if (!m_isInitialized)
+ return;
+
+ if (m_depthTexture) {
m_textureHelper->deleteTexture(&m_depthTexture);
+ m_depthTexture = 0;
+ }
if (m_shadowQuality > ShadowNone) {
m_depthTexture = m_textureHelper->createDepthTexture(this->size(), m_depthFrameBuffer,