Quellcode durchsuchen

moved lastFrame set from new texture to alloc time

Nicolas Cannasse vor 11 Jahren
Ursprung
Commit
eaccd9083f
2 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 0
      h3d/impl/Stage3dDriver.hx
  2. 0 1
      h3d/mat/Texture.hx

+ 1 - 0
h3d/impl/Stage3dDriver.hx

@@ -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 {

+ 0 - 1
h3d/mat/Texture.hx

@@ -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 )