From b7e3461e1a7119333856f44f05c08d137b8d1948 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 28 May 2015 12:21:38 -0700 Subject: [PATCH 1/3] restore _created magic --- libraries/entities/src/EntityItem.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index e0297fe7d4..64196d1c35 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -957,9 +957,6 @@ bool EntityItem::setProperties(const EntityItemProperties& properties) { #endif setLastEdited(now); somethingChangedNotification(); // notify derived classes that something has changed - if (_created == UNKNOWN_CREATED_TIME) { - _created = now; - } if (getDirtyFlags() & (EntityItem::DIRTY_TRANSFORM | EntityItem::DIRTY_VELOCITIES)) { // anything that sets the transform or velocity must update _lastSimulated which is used // for kinematic extrapolation (e.g. we want to extrapolate forward from this moment @@ -968,6 +965,16 @@ bool EntityItem::setProperties(const EntityItemProperties& properties) { } } + // timestamps + quint64 timestamp = properties.getCreated(); + if (_created == UNKNOWN_CREATED_TIME && timestamp != UNKNOWN_CREATED_TIME) { + quint64 now = usecTimestampNow(); + if (timestamp > now) { + timestamp = now; + } + _created = timestamp; + } + return somethingChanged; } From b90d35c0c0ed59d722d9f81b07f6d77674a34ac4 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 28 May 2015 12:22:17 -0700 Subject: [PATCH 2/3] restore code to fix box entites not rendering boxes wouldn't render when in an otherwise empty domain --- libraries/render-utils/src/DeferredLightingEffect.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 795b2a4389..54e5388ec8 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -93,16 +93,16 @@ void DeferredLightingEffect::init(AbstractViewStateInterface* viewState) { } void DeferredLightingEffect::bindSimpleProgram() { - // DependencyManager::get()->setPrimaryDrawBuffers(true, true, true); + DependencyManager::get()->setPrimaryDrawBuffers(true, true, true); _simpleProgram.bind(); _simpleProgram.setUniformValue(_glowIntensityLocation, DependencyManager::get()->getIntensity()); - // glDisable(GL_BLEND); + glDisable(GL_BLEND); } void DeferredLightingEffect::releaseSimpleProgram() { - // glEnable(GL_BLEND); + glEnable(GL_BLEND); _simpleProgram.release(); - // DependencyManager::get()->setPrimaryDrawBuffers(true, false, false); + DependencyManager::get()->setPrimaryDrawBuffers(true, false, false); } void DeferredLightingEffect::renderSolidSphere(float radius, int slices, int stacks, const glm::vec4& color) { From 0c6de897f55c7c61d86420bad227cdf08baf2a6f Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 28 May 2015 12:26:29 -0700 Subject: [PATCH 3/3] replace tab with spaces --- tests/physics/src/MeshMassPropertiesTests.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/physics/src/MeshMassPropertiesTests.h b/tests/physics/src/MeshMassPropertiesTests.h index ab352bfce2..07cd774d34 100644 --- a/tests/physics/src/MeshMassPropertiesTests.h +++ b/tests/physics/src/MeshMassPropertiesTests.h @@ -15,7 +15,7 @@ namespace MeshMassPropertiesTests{ void testParallelAxisTheorem(); void testTetrahedron(); void testOpenTetrahedonMesh(); - void testClosedTetrahedronMesh(); + void testClosedTetrahedronMesh(); void testBoxAsMesh(); void runAllTests(); }