Skip to content

Commit

Permalink
Try to fix the remaining backends
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Jan 20, 2024
1 parent d951192 commit 23e37cb
Show file tree
Hide file tree
Showing 15 changed files with 318 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Backends/Empty/kha/graphics4/ComputeShader.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
24 changes: 24 additions & 0 deletions Backends/Empty/kha/graphics4/ShaderStorageBuffer.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
22 changes: 22 additions & 0 deletions Backends/HTML5-Worker/kha/graphics4/ComputeShader.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
24 changes: 24 additions & 0 deletions Backends/HTML5-Worker/kha/graphics4/ShaderStorageBuffer.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
14 changes: 14 additions & 0 deletions Backends/HTML5-Worker/kha/html5worker/Graphics.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {

}
}
22 changes: 22 additions & 0 deletions Backends/Java/kha/graphics4/ComputeShader.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
24 changes: 24 additions & 0 deletions Backends/Java/kha/graphics4/ShaderStorageBuffer.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
22 changes: 22 additions & 0 deletions Backends/Krom/kha/graphics4/ComputeShader.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
24 changes: 24 additions & 0 deletions Backends/Krom/kha/graphics4/ShaderStorageBuffer.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
14 changes: 14 additions & 0 deletions Backends/Krom/kha/krom/Graphics.hx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import kha.Blob;
import kha.graphics4.BlendingFactor;
import kha.graphics4.BlendingOperation;
import kha.graphics4.CompareMode;
import kha.graphics4.ComputeShader;
import kha.graphics4.CubeMap;
import kha.graphics4.CullMode;
import kha.graphics4.FragmentShader;
import kha.graphics4.IndexBuffer;
import kha.graphics4.MipMapFilter;
import kha.graphics4.PipelineState;
import kha.graphics4.ShaderStorageBuffer;
import kha.graphics4.StencilAction;
import kha.graphics4.TexDir;
import kha.graphics4.TextureAddressing;
Expand Down Expand Up @@ -253,4 +255,16 @@ class Graphics implements kha.graphics4.Graphics {
public function disableScissor(): Void {
Krom.disableScissor();
}

public function setShaderStorageBuffer(buffer: ShaderStorageBuffer, index: Int) {

}

public function setComputeShader(shader: ComputeShader) {

}

public function compute(x: Int, y: Int, z: Int) {

}
}
22 changes: 22 additions & 0 deletions Backends/Node/kha/graphics4/ComputeShader.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
24 changes: 24 additions & 0 deletions Backends/Node/kha/graphics4/ShaderStorageBuffer.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
14 changes: 14 additions & 0 deletions Backends/Node/kha/js/EmptyGraphics4.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package kha.js;
import kha.arrays.Float32Array;
import kha.graphics4.BlendingOperation;
import kha.graphics4.CompareMode;
import kha.graphics4.ComputeShader;
import kha.graphics4.ConstantLocation;
import kha.graphics4.CubeMap;
import kha.graphics4.CullMode;
import kha.graphics4.Graphics;
import kha.graphics4.IndexBuffer;
import kha.graphics4.MipMapFilter;
import kha.graphics4.PipelineState;
import kha.graphics4.ShaderStorageBuffer;
import kha.graphics4.StencilAction;
import kha.graphics4.TextureAddressing;
import kha.graphics4.TextureFilter;
Expand Down Expand Up @@ -144,4 +146,16 @@ class EmptyGraphics4 implements Graphics {
}

public function drawIndexedVerticesInstanced(instanceCount: Int, start: Int = 0, count: Int = -1): Void {}

public function setShaderStorageBuffer(buffer: ShaderStorageBuffer, index: Int) {

}

public function setComputeShader(shader: ComputeShader) {

}

public function compute(x: Int, y: Int, z: Int) {

}
}
22 changes: 22 additions & 0 deletions Backends/WPF/kha/graphics4/ComputeShader.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}
24 changes: 24 additions & 0 deletions Backends/WPF/kha/graphics4/ShaderStorageBuffer.hx
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit 23e37cb

Please sign in to comment.