Browse Source

Load shadercache when needeed.

clementlandrin 2 years ago
parent
commit
18d9031bdb
1 changed files with 1 additions and 2 deletions
  1. 1 2
      h3d/impl/ShaderCache.hx

+ 1 - 2
h3d/impl/ShaderCache.hx

@@ -4,7 +4,7 @@ class ShaderCache {
 
 	var file : String;
 	var outputFile : String;
-	var data : Map<String, haxe.io.Bytes> = [];
+	var data : Map<String, haxe.io.Bytes> = null;
 	var sources : Map<String, String> = [];
 	var sourceFile : String;
 	public var keepSource : Bool;
@@ -13,7 +13,6 @@ class ShaderCache {
 		this.file = file;
 		this.outputFile = outputFile ?? file;
 		sourceFile = file + ".source";
-		load();
 	}
 
 	public function disableSave() {