This commit is contained in:
Dante
2026-05-21 23:40:20 -07:00
parent 3e2915dff7
commit 877a69d844
5737 changed files with 29796 additions and 1589684 deletions

View 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;
}

View File

@ -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;

View File

@ -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;

View 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;
}