Fixed bug: After mouse event objects disapearing

This commit is contained in:
Yaski
2012-05-22 17:50:59 +06:00
parent daac30c68e
commit 957c938684
2 changed files with 5 additions and 0 deletions

View File

@@ -90,6 +90,10 @@ package alternativa.engine3d.core {
}
}
}
_contextProperties.culling = null;
_contextProperties.blendSource = null;
_contextProperties.blendDestination = null;
_contextProperties.program = null;
// Clear
drawUnits.length = 0;
}

View File

@@ -652,6 +652,7 @@ package alternativa.engine3d.core {
cachedContext3D = context;
context3DViewProperties = properties[cachedContext3D];
if (context3DViewProperties == null) {
// TODO: create programs on first render
context3DViewProperties = new Context3DViewProperties();
var rectGeometry:Geometry = new Geometry(4);
rectGeometry.addVertexStream([VertexAttributes.POSITION, VertexAttributes.POSITION, VertexAttributes.POSITION, VertexAttributes.TEXCOORDS[0], VertexAttributes.TEXCOORDS[0]]);