Cleanup
This commit is contained in:
@@ -677,21 +677,12 @@ enum blend_factor_t {
|
||||
DEST_ALPHA,
|
||||
INV_SOURCE_ALPHA,
|
||||
INV_DEST_ALPHA,
|
||||
SOURCE_COLOR,
|
||||
DEST_COLOR,
|
||||
INV_SOURCE_COLOR,
|
||||
INV_DEST_COLOR,
|
||||
}
|
||||
|
||||
enum compare_mode_t {
|
||||
ALWAYS,
|
||||
NEVER,
|
||||
EQUAL,
|
||||
NOT_EQUAL,
|
||||
LESS,
|
||||
LESS_EQUAL,
|
||||
GREATER,
|
||||
GREATER_EQUAL,
|
||||
}
|
||||
|
||||
enum cull_mode_t {
|
||||
@@ -701,8 +692,8 @@ enum cull_mode_t {
|
||||
}
|
||||
|
||||
enum shader_type_t {
|
||||
FRAGMENT,
|
||||
VERTEX,
|
||||
FRAGMENT,
|
||||
}
|
||||
|
||||
declare let ui_nodes_enum_texts: (s: string)=>string[];
|
||||
|
||||
@@ -614,7 +614,6 @@ type shader_const_t = {
|
||||
type tex_unit_t = {
|
||||
name?: string;
|
||||
link?: string;
|
||||
vert?: bool;
|
||||
};
|
||||
|
||||
type speaker_data_t = {
|
||||
|
||||
@@ -252,24 +252,6 @@ function shader_context_get_compare_mode(s: string): compare_mode_t {
|
||||
if (s == "never") {
|
||||
return compare_mode_t.NEVER;
|
||||
}
|
||||
if (s == "less") {
|
||||
return compare_mode_t.LESS;
|
||||
}
|
||||
if (s == "less_equal") {
|
||||
return compare_mode_t.LESS_EQUAL;
|
||||
}
|
||||
if (s == "greater") {
|
||||
return compare_mode_t.GREATER;
|
||||
}
|
||||
if (s == "greater_equal") {
|
||||
return compare_mode_t.GREATER_EQUAL;
|
||||
}
|
||||
if (s == "equal") {
|
||||
return compare_mode_t.EQUAL;
|
||||
}
|
||||
if (s == "not_equal") {
|
||||
return compare_mode_t.NOT_EQUAL;
|
||||
}
|
||||
return compare_mode_t.LESS;
|
||||
}
|
||||
|
||||
@@ -302,18 +284,6 @@ function shader_context_get_blend_fac(s: string): blend_factor_t {
|
||||
if (s == "inverse_destination_alpha") {
|
||||
return blend_factor_t.INV_DEST_ALPHA;
|
||||
}
|
||||
if (s == "source_color") {
|
||||
return blend_factor_t.SOURCE_COLOR;
|
||||
}
|
||||
if (s == "destination_color") {
|
||||
return blend_factor_t.DEST_COLOR;
|
||||
}
|
||||
if (s == "inverse_source_color") {
|
||||
return blend_factor_t.INV_SOURCE_COLOR;
|
||||
}
|
||||
if (s == "inverse_destination_color") {
|
||||
return blend_factor_t.INV_DEST_COLOR;
|
||||
}
|
||||
return blend_factor_t.BLEND_ONE;
|
||||
}
|
||||
|
||||
@@ -348,13 +318,6 @@ function shader_context_add_const(raw: shader_context_t, c: shader_const_t, offs
|
||||
|
||||
function shader_context_add_tex(raw: shader_context_t, tu: tex_unit_t, i: i32) {
|
||||
let unit: iron_gpu_texture_unit_t = gpu_get_texture_unit(raw._.pipe_state, tu.name);
|
||||
|
||||
if (tu.vert) {
|
||||
ARRAY_ACCESS(unit.stages, IRON_GPU_SHADER_TYPE_VERTEX) = i;
|
||||
}
|
||||
else {
|
||||
ARRAY_ACCESS(unit.stages, IRON_GPU_SHADER_TYPE_FRAGMENT) = i;
|
||||
}
|
||||
|
||||
unit.offset = i;
|
||||
array_push(raw._.tex_units, unit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user