forked from LeenkxTeam/LNXSDK
VOX_PATCH_2 + VOX_5
This commit is contained in:
@ -142,6 +142,8 @@ class Image implements Canvas implements Resource {
|
||||
return 5;
|
||||
case A16:
|
||||
return 7;
|
||||
case R32UI:
|
||||
return 8;
|
||||
default:
|
||||
return 1; // Grey8
|
||||
}
|
||||
|
||||
@ -234,6 +234,8 @@ class Image implements Canvas implements Resource {
|
||||
return 5;
|
||||
case A16:
|
||||
return 7;
|
||||
case R32UI:
|
||||
return 8;
|
||||
default:
|
||||
return 1; // Grey8
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@ extern class Krom {
|
||||
static function setRenderTarget(stage: kha.graphics4.TextureUnit, renderTarget: Dynamic): Void;
|
||||
static function setTextureDepth(unit: kha.graphics4.TextureUnit, texture: Dynamic): Void;
|
||||
static function setImageTexture(stage: kha.graphics4.TextureUnit, texture: Dynamic): Void;
|
||||
static function setImageRenderTarget(stage: kha.graphics4.TextureUnit, renderTarget: Dynamic): Void;
|
||||
static function setTextureParameters(texunit: kha.graphics4.TextureUnit, uAddressing: Int, vAddressing: Int, minificationFilter: Int,
|
||||
magnificationFilter: Int, mipmapFilter: Int): Void;
|
||||
static function setTexture3DParameters(texunit: kha.graphics4.TextureUnit, uAddressing: Int, vAddressing: Int, wAddressing: Int, minificationFilter: Int,
|
||||
|
||||
@ -75,6 +75,8 @@ class Image implements Canvas implements Resource {
|
||||
return 5;
|
||||
case A16:
|
||||
return 7;
|
||||
case R32UI:
|
||||
return 8;
|
||||
default:
|
||||
return 1; // Grey8
|
||||
}
|
||||
@ -200,6 +202,7 @@ class Image implements Canvas implements Resource {
|
||||
case RGBA64: 8;
|
||||
case A32: 4;
|
||||
case A16: 2;
|
||||
case R32UI: 4;
|
||||
default: 4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ class Compute {
|
||||
public static function setSampledDepthTexture(unit: TextureUnit, texture: Image) {
|
||||
if (texture == null)
|
||||
return;
|
||||
Krom.setSampledDepthTextureCompute(unit, texture);
|
||||
Krom.setSampledDepthTextureCompute(unit, texture.renderTarget_);
|
||||
}
|
||||
|
||||
public static function setSampledCubeMap(unit: TextureUnit, cubeMap: CubeMap) {
|
||||
@ -118,7 +118,7 @@ class Compute {
|
||||
public static function setSampledDepthCubeMap(unit: TextureUnit, cubeMap: CubeMap) {
|
||||
if (cubeMap == null)
|
||||
return;
|
||||
Krom.setSampledDepthTextureCompute(unit, cubeMap);
|
||||
Krom.setSampledDepthTextureCompute(unit, cubeMap.renderTarget_);
|
||||
}
|
||||
|
||||
public static function setTextureParameters(unit: TextureUnit, uAddressing: TextureAddressing, vAddressing: TextureAddressing,
|
||||
|
||||
@ -9,14 +9,7 @@ class ShaderStorageBuffer {
|
||||
public function new(indexCount: Int, type: VertexData) {
|
||||
myCount = indexCount;
|
||||
data = new Array<Int>();
|
||||
data[myCount - 1] = 0;
|
||||
init(indexCount, type);
|
||||
}
|
||||
|
||||
function init(indexCount: Int, type: VertexData) {
|
||||
myCount = indexCount;
|
||||
data = new Array<Int>();
|
||||
data[myCount - 1] = 0;
|
||||
if (myCount > 0) data[myCount - 1] = 0;
|
||||
}
|
||||
|
||||
public function delete(): Void {}
|
||||
|
||||
@ -122,7 +122,12 @@ class Graphics implements kha.graphics4.Graphics {
|
||||
public function setImageTexture(unit: kha.graphics4.TextureUnit, texture: kha.Image): Void {
|
||||
if (texture == null)
|
||||
return;
|
||||
Krom.setImageTexture(unit, texture.texture_);
|
||||
if (texture.texture_ != null) {
|
||||
Krom.setImageTexture(unit, texture.texture_);
|
||||
}
|
||||
else if (texture.renderTarget_ != null) {
|
||||
Krom.setImageRenderTarget(unit, texture.renderTarget_);
|
||||
}
|
||||
}
|
||||
|
||||
public function setTextureParameters(texunit: kha.graphics4.TextureUnit, uAddressing: TextureAddressing, vAddressing: TextureAddressing,
|
||||
|
||||
Reference in New Issue
Block a user