paint: cleanup
This commit is contained in:
@@ -11,20 +11,20 @@ static mesh_object_t *render_pathsphere_obj = NULL;
|
||||
static node_shader_context_t *make_pathsphere_shader(char *name) {
|
||||
material_t *mat = ALLOC_INIT(material_t, {.name = name, .canvas = NULL});
|
||||
shader_context_t *props = ALLOC_INIT(shader_context_t, {
|
||||
.name = "overlay",
|
||||
.depth_write = false,
|
||||
.compare_mode = "always",
|
||||
.cull_mode = "clockwise",
|
||||
.vertex_elements = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
ALLOC_INIT(vertex_element_t, {.name = "pos", .data = "short4norm"}),
|
||||
ALLOC_INIT(vertex_element_t, {.name = "nor", .data = "short2norm"}),
|
||||
ALLOC_INIT(vertex_element_t, {.name = "tex", .data = "short2norm"}),
|
||||
},
|
||||
3),
|
||||
.color_attachments = any_array_create_from_raw((void *[]){"RGBA64"}, 1),
|
||||
.depth_attachment = "NONE",
|
||||
});
|
||||
.name = "overlay",
|
||||
.depth_write = false,
|
||||
.compare_mode = "always",
|
||||
.cull_mode = "clockwise",
|
||||
.vertex_elements = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
ALLOC_INIT(vertex_element_t, {.name = "pos", .data = "short4norm"}),
|
||||
ALLOC_INIT(vertex_element_t, {.name = "nor", .data = "short2norm"}),
|
||||
ALLOC_INIT(vertex_element_t, {.name = "tex", .data = "short2norm"}),
|
||||
},
|
||||
3),
|
||||
.color_attachments = any_array_create_from_raw((void *[]){"RGBA64"}, 1),
|
||||
.depth_attachment = "NONE",
|
||||
});
|
||||
node_shader_context_t *con = node_shader_context_create(mat, props);
|
||||
node_shader_t *kong = node_shader_context_make_kong(con);
|
||||
|
||||
@@ -101,21 +101,21 @@ static void create_pathsphere_object() {
|
||||
shader_context_load(con->data);
|
||||
|
||||
shader_data_t *sd = ALLOC_INIT(shader_data_t, {
|
||||
.name = "render_pathsphere",
|
||||
.contexts = any_array_create_from_raw((void *[]){con->data}, 1),
|
||||
});
|
||||
.name = "render_pathsphere",
|
||||
.contexts = any_array_create_from_raw((void *[]){con->data}, 1),
|
||||
});
|
||||
material_context_t *mcon = ALLOC_INIT(material_context_t, {
|
||||
.name = "overlay",
|
||||
.bind_constants = any_array_create_from_raw((void *[]){}, 0),
|
||||
.bind_textures = any_array_create_from_raw((void *[]){}, 0),
|
||||
});
|
||||
.name = "overlay",
|
||||
.bind_constants = any_array_create_from_raw((void *[]){}, 0),
|
||||
.bind_textures = any_array_create_from_raw((void *[]){}, 0),
|
||||
});
|
||||
material_context_load(mcon);
|
||||
material_data_t *mat = ALLOC_INIT(material_data_t, {
|
||||
.name = "render_pathsphere",
|
||||
.shader = "",
|
||||
.contexts = any_array_create_from_raw((void *[]){mcon}, 1),
|
||||
._ = ALLOC_INIT(material_data_runtime_t, {.uid = 0.0, .shader = sd}),
|
||||
});
|
||||
.name = "render_pathsphere",
|
||||
.shader = "",
|
||||
.contexts = any_array_create_from_raw((void *[]){mcon}, 1),
|
||||
._ = ALLOC_INIT(material_data_runtime_t, {.uid = 0.0, .shader = sd}),
|
||||
});
|
||||
|
||||
render_pathsphere_obj = mesh_object_create(md, mat);
|
||||
render_pathsphere_obj->base->name = "render_pathsphere";
|
||||
|
||||
Reference in New Issue
Block a user