forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
10
Kha/Sources/kha/graphics4/ComputeShader.hx
Normal file
10
Kha/Sources/kha/graphics4/ComputeShader.hx
Normal file
@ -0,0 +1,10 @@
|
||||
package kha.graphics4;
|
||||
|
||||
import kha.Blob;
|
||||
|
||||
extern class Shader {
|
||||
public function new(sources: Array<Blob>, files: Array<String>);
|
||||
public function delete(): Void;
|
||||
public function getConstantLocation(name: String): ConstantLocation;
|
||||
public function getTextureUnit(name: String): TextureUnit;
|
||||
}
|
||||
@ -53,6 +53,10 @@ interface Graphics {
|
||||
|
||||
function setPipeline(pipeline: PipelineState): Void;
|
||||
|
||||
function setShaderStorageBuffer(buffer: ShaderStorageBuffer, index: Int): Void;
|
||||
function setComputeShader(shader: ComputeShader): Void;
|
||||
function compute(x: Int, y: Int, z: Int): Void;
|
||||
|
||||
function setBool(location: ConstantLocation, value: Bool): Void;
|
||||
function setInt(location: ConstantLocation, value: Int): Void;
|
||||
function setInt2(location: ConstantLocation, value1: Int, value2: Int): Void;
|
||||
|
||||
@ -413,7 +413,7 @@ class ColoredShaderPainter {
|
||||
|
||||
triangleIndexBuffer = new IndexBuffer(triangleBufferSize * 3, Usage.StaticUsage);
|
||||
var triIndices = triangleIndexBuffer.lock();
|
||||
for (i in 0...bufferSize) {
|
||||
for (i in 0...triangleBufferSize) {
|
||||
triIndices[i * 3 + 0] = i * 3 + 0;
|
||||
triIndices[i * 3 + 1] = i * 3 + 1;
|
||||
triIndices[i * 3 + 2] = i * 3 + 2;
|
||||
|
||||
10
Kha/Sources/kha/graphics4/ShaderStorageBuffer.hx
Normal file
10
Kha/Sources/kha/graphics4/ShaderStorageBuffer.hx
Normal file
@ -0,0 +1,10 @@
|
||||
package kha.graphics4;
|
||||
|
||||
extern class ShaderStorageBuffer {
|
||||
public function new(indexCount: Int, type: VertexData);
|
||||
public function delete(): Void;
|
||||
public function lock(): Array<Int>;
|
||||
public function unlock(): Void;
|
||||
public function set(): Void;
|
||||
public function count(): Int;
|
||||
}
|
||||
Reference in New Issue
Block a user