Просмотр исходного кода

Transform matrix now always rebuilt if dirty on render

Ivan Safrin 11 лет назад
Родитель
Сommit
b514a35036
2 измененных файлов с 6 добавлено и 3 удалено
  1. 4 0
      Core/Contents/Source/PolyEntity.cpp
  2. 2 3
      IDE/Contents/Source/PolycodeIDEApp.cpp

+ 4 - 0
Core/Contents/Source/PolyEntity.cpp

@@ -444,6 +444,10 @@ void Entity::transformAndRender() {
 	if(!renderer || !enabled)
 		return;
 
+	if(matrixDirty) {
+		rebuildTransformMatrix();
+    }
+    
 	if(depthOnly) {
 		renderer->drawToColorBuffer(false);
 	}

+ 2 - 3
IDE/Contents/Source/PolycodeIDEApp.cpp

@@ -1393,8 +1393,7 @@ bool PolycodeIDEApp::Update() {
 		frame->getConsoleSizer()->enabled = false;		
 	}
 
-	bool retVal = core->Update();
-	core->Render();
-	return retVal;
+
+	return core->updateAndRender();
 }