Преглед изворни кода

Compute world poses the first time a SceneGraph gets created

Daniele Bartolini пре 12 година
родитељ
комит
f7698205de
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      engine/world/SceneGraph.cpp

+ 3 - 2
engine/world/SceneGraph.cpp

@@ -64,11 +64,12 @@ void SceneGraph::create(uint32_t count, const StringId32* name, const Matrix4x4*
 	m_parents = (int32_t*) mem; mem += sizeof(int32_t) * count;
 	m_names = (StringId32*) mem; mem += sizeof(StringId32) * count;
 
-	memset(m_flags, (int) CLEAN, sizeof(uint8_t) * count);
+	memset(m_flags, (int) LOCAL_DIRTY, sizeof(uint8_t) * count);
 	memcpy(m_local_poses, local, sizeof(Matrix4x4) * count);
-	memcpy(m_world_poses, local, sizeof(Matrix4x4) * count);
 	memcpy(m_parents, parent, sizeof(int32_t) * count);
 	memcpy(m_names, name, sizeof(StringId32) * count);
+
+	update();
 }
 
 //-----------------------------------------------------------------------------