@@ -179,6 +179,7 @@ class Stage3dDriver extends Driver {
override function allocTexture( t : h3d.mat.Texture ) : Texture {
var fmt = flash.display3D.Context3DTextureFormat.BGRA;
+ t.lastFrame = frame;
if( t.flags.has(TargetDepth) )
throw "Unsupported texture flag";
try {
@@ -32,7 +32,6 @@ class Texture {
public function new(w, h, ?flags : Array<TextureFlags>, ?allocPos : h3d.impl.AllocPos ) {
var engine = h3d.Engine.getCurrent();
this.mem = engine.mem;
- this.lastFrame = engine.frameCount;
this.id = ++UID;
this.flags = new haxe.EnumFlags();
if( flags != null )