Pārlūkot izejas kodu

added onContextLost

ncannasse 9 gadi atpakaļ
vecāks
revīzija
db6d022cf8
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 6 1
      h3d/scene/World.hx

+ 6 - 1
h3d/scene/World.hx

@@ -206,7 +206,7 @@ class World extends Object {
 			var res = resolveSpecularTexture(texturePath);
 			if( specularInAlpha ) {
 				if( res != null ) {
-					t.t.setAlpha(res, t);
+					t.setAlpha(res);
 					specTex = t;
 				}
 			} else {
@@ -440,6 +440,11 @@ class World extends Object {
 		textures = new Map();
 	}
 
+	public function onContextLost() {
+		for( c in allChunks )
+			cleanChunk(c);
+	}
+
 	function getStride( model : WorldModel ) {
 		return model.stride;
 	}