Closed MerlinTwi closed 11 years ago
Hello and thank you for your feedback! Can you please provide some sample code to reproduce the issue?
package {
import aerys.minko.render.Effect;
import aerys.minko.render.geometry.primitive.CubeGeometry;
import aerys.minko.render.material.basic.BasicShader;
import aerys.minko.render.material.Material;
import aerys.minko.scene.node.ISceneNode;
import aerys.minko.scene.node.Mesh;
import flash.events.Event;
public class Main extends MinkoExampleApplication {
override protected function enterFrameHandler(event : Event) : void {
if (Math.random() < 0.1) {
while (scene.numChildren > 1) {
scene.removeChildAt(scene.numChildren - 1);
}
} else {
while (scene.numChildren < 2) {
scene.addChild(createObject());
}
}
trace('numDrawCalls=', scene.numDrawCalls);
super.enterFrameHandler(event);
}
private function createObject():ISceneNode {
var sh:BasicShader = new BasicShader();
sh.enabled = Math.random() > 0.5;
var m:Material = new Material(new Effect(sh), { diffuseColor : 0x00ff00ff } );
return new Mesh( CubeGeometry.cubeGeometry, m);
}
}
}
trace
numDrawCalls= 1
numDrawCalls= 0
numDrawCalls= 0
numDrawCalls= 4294967295
numDrawCalls= 1
fixed in 4f25b22226db3d5d66a1472c05883d2884d4a101 soon on github
add check at RenderingController.deleteDrawCalls
Have exeption at Scene.removeChild()
Wrong deleteDrawCalls. _numDrawCalls=0, numDrawCalls=3 Error at aerys.minko.scene.controller.scene::RenderingController/deleteDrawCalls()[classes\aerys\minko\scene\controller\scene\RenderingController.as:629] at aerys.minko.scene.controller.scene::RenderingController/meshGeometryChangedHandler()[classes\aerys\minko\scene\controller\scene\RenderingController.as:698] at Function/http://adobe.com/AS3/2006/builtin::apply() at aerys.minko.type::Signal/execute()[classes\aerys\minko\type\Signal.as:131] at aerys.minko.type.binding::DataBindings/removeBinding()[classes\aerys\minko\type\binding\DataBindings.as:164] at aerys.minko.type.binding::DataBindings/removeProvider()[classes\aerys\minko\type\binding\DataBindings.as:141] at aerys.minko.scene.controller.mesh::MeshController/removedHandler()[classes\aerys\minko\scene\controller\mesh\MeshController.as:101] at Function/http://adobe.com/AS3/2006/builtin::apply() at aerys.minko.type::Signal/execute()[classes\aerys\minko\type\Signal.as:131] at aerys.minko.scene.node::Group/removedHandler()[classes\aerys\minko\scene\node\Group.as:176] at Function/http://adobe.com/AS3/2006/builtin::apply() at aerys.minko.type::Signal/execute()[classes\aerys\minko\type\Signal.as:131] at aerys.minko.scene.node::AbstractSceneNode/set parent()[classes\aerys\minko\scene\node\AbstractSceneNode.as:153] at aerys.minko.scene.node::Group/removeChildAt()[classes\aerys\minko\scene\node\Group.as:269] at aerys.minko.scene.node::Group/removeChild()[classes\aerys\minko\scene\node\Group.as:261] at engine3d.legacy::Scene3D/removeObject()[classes\engine3d\legacy\Scene3D.as:494] // Scene.removeChild at ...