forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
22
Kha/Backends/HTML5-Worker/kha/graphics4/ComputeShader.hx
Normal file
22
Kha/Backends/HTML5-Worker/kha/graphics4/ComputeShader.hx
Normal file
@ -0,0 +1,22 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package kha.graphics4;
|
||||
|
||||
class ShaderStorageBuffer {
|
||||
var data: Array<Int>;
|
||||
var myCount: Int;
|
||||
|
||||
public function new(indexCount: Int, type: VertexData) {
|
||||
myCount = indexCount;
|
||||
data = new Array<Int>();
|
||||
data[myCount - 1] = 0;
|
||||
}
|
||||
|
||||
public function delete(): Void {}
|
||||
|
||||
public function lock(): Array<Int> {
|
||||
return data;
|
||||
}
|
||||
|
||||
public function unlock(): Void {}
|
||||
|
||||
public function count(): Int {
|
||||
return myCount;
|
||||
}
|
||||
}
|
||||
@ -2,9 +2,11 @@ package kha.html5worker;
|
||||
|
||||
import kha.arrays.Float32Array;
|
||||
import kha.Canvas;
|
||||
import kha.graphics4.ComputeShader;
|
||||
import kha.graphics4.IndexBuffer;
|
||||
import kha.graphics4.MipMapFilter;
|
||||
import kha.graphics4.PipelineState;
|
||||
import kha.graphics4.ShaderStorageBuffer;
|
||||
import kha.graphics4.TextureAddressing;
|
||||
import kha.graphics4.TextureFilter;
|
||||
import kha.graphics4.Usage;
|
||||
@ -342,4 +344,16 @@ class Graphics implements kha.graphics4.Graphics {
|
||||
public function maxBoundTextures(): Int {
|
||||
return 16;
|
||||
}
|
||||
|
||||
public function setShaderStorageBuffer(buffer: ShaderStorageBuffer, index: Int) {
|
||||
|
||||
}
|
||||
|
||||
public function setComputeShader(shader: ComputeShader) {
|
||||
|
||||
}
|
||||
|
||||
public function compute(x: Int, y: Int, z: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user