forked from LeenkxTeam/LNXSDK
Compute 0
This commit is contained in:
@ -266,7 +266,6 @@ class Graphics implements kha.graphics4.Graphics {
|
||||
}
|
||||
|
||||
public function beginFace(face: Int): Void {
|
||||
// TODO: Hashlink conflict for shadowmap atlasing needs image and probes need cubemap
|
||||
kinc_graphics_render_to_face((target is CubeMap) ? cast(target, CubeMap)._renderTarget : cast(target, Image)._renderTarget, face);
|
||||
}
|
||||
|
||||
|
||||
@ -1,22 +1,25 @@
|
||||
package kha.graphics4;
|
||||
|
||||
import haxe.io.Bytes;
|
||||
import kha.Blob;
|
||||
|
||||
class ComputeShader {
|
||||
public function new(sources: Array<Blob>, files: Array<String>) {
|
||||
|
||||
}
|
||||
|
||||
public function delete(): Void {
|
||||
|
||||
}
|
||||
|
||||
public function getConstantLocation(name: String): ConstantLocation {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getTextureUnit(name: String): TextureUnit {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
package kha.graphics4;
|
||||
|
||||
import haxe.io.Bytes;
|
||||
import kha.Blob;
|
||||
|
||||
class ComputeShader {
|
||||
public var shader_: Dynamic;
|
||||
|
||||
public function new(sources: Array<Blob>, files: Array<String>) {
|
||||
shader_ = Krom.createShaderCompute(sources[0].toBytes().getData());
|
||||
}
|
||||
|
||||
public function delete(): Void {
|
||||
Krom.deleteShaderCompute(shader_);
|
||||
shader_ = null;
|
||||
}
|
||||
|
||||
public function getConstantLocation(name: String): ConstantLocation {
|
||||
return Krom.getConstantLocationCompute(shader_, name);
|
||||
}
|
||||
|
||||
public function getTextureUnit(name: String): TextureUnit {
|
||||
return Krom.getTextureUnitCompute(shader_, name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,10 +261,10 @@ class Graphics implements kha.graphics4.Graphics {
|
||||
}
|
||||
|
||||
public function setComputeShader(shader: ComputeShader) {
|
||||
|
||||
Krom.setShaderCompute(shader.shader_);
|
||||
}
|
||||
|
||||
public function compute(x: Int, y: Int, z: Int) {
|
||||
|
||||
Krom.compute(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user