forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
27
Kha/Backends/HTML5-Worker/kha/graphics4/FragmentShader.hx
Normal file
27
Kha/Backends/HTML5-Worker/kha/graphics4/FragmentShader.hx
Normal file
@ -0,0 +1,27 @@
|
||||
package kha.graphics4;
|
||||
|
||||
class FragmentShader {
|
||||
public var sources: Array<String>;
|
||||
public var shader: Dynamic;
|
||||
public var files: Array<String>;
|
||||
|
||||
public function new(sources: Array<Blob>, files: Array<String>) {
|
||||
this.sources = [];
|
||||
for (source in sources) {
|
||||
this.sources.push(source.toString());
|
||||
}
|
||||
this.shader = null;
|
||||
this.files = files;
|
||||
}
|
||||
|
||||
public static function fromSource(source: String): FragmentShader {
|
||||
var shader = new FragmentShader([], ["runtime-string"]);
|
||||
shader.sources.push(source);
|
||||
return shader;
|
||||
}
|
||||
|
||||
public function delete(): Void {
|
||||
shader = null;
|
||||
sources = null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user