paint: cleanup
This commit is contained in:
@@ -2,16 +2,16 @@
|
||||
#include "../global.h"
|
||||
|
||||
void _parser_material_cache_tex_text_node_on_next_frame(char *text) {
|
||||
char *_text_tool_text = context_raw->text_tool_text;
|
||||
gpu_texture_t *_text_tool_image = context_raw->text_tool_image;
|
||||
context_raw->text_tool_text = string_copy(text);
|
||||
context_raw->text_tool_image = NULL;
|
||||
char *_text_tool_text = g_context->text_tool_text;
|
||||
gpu_texture_t *_text_tool_image = g_context->text_tool_image;
|
||||
g_context->text_tool_text = string_copy(text);
|
||||
g_context->text_tool_image = NULL;
|
||||
util_render_make_text_preview();
|
||||
char *file = string("tex_text_%s", text);
|
||||
// TODO: remove old cache
|
||||
any_map_set(data_cached_images, file, context_raw->text_tool_image);
|
||||
context_raw->text_tool_text = string_copy(_text_tool_text);
|
||||
context_raw->text_tool_image = _text_tool_image;
|
||||
any_map_set(data_cached_images, file, g_context->text_tool_image);
|
||||
g_context->text_tool_text = string_copy(_text_tool_text);
|
||||
g_context->text_tool_image = _text_tool_image;
|
||||
}
|
||||
|
||||
void _parser_material_cache_tex_text_node(char *file, char *text) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
char *uv_map_node_vector(ui_node_t *node, ui_node_socket_t *socket) {
|
||||
node_shader_context_add_elem(parser_material_kong->context, "tex", "short2norm");
|
||||
i32 uv_map = node->buttons->buffer[0]->default_value->buffer[0];
|
||||
if (uv_map == 1 && mesh_data_get_vertex_array(context_raw->paint_object->data, "tex1") != NULL) {
|
||||
if (uv_map == 1 && mesh_data_get_vertex_array(g_context->paint_object->data, "tex1") != NULL) {
|
||||
node_shader_context_add_elem(parser_material_kong->context, "tex1", "short2norm");
|
||||
node_shader_add_out(parser_material_kong, "tex_coord1: float2");
|
||||
node_shader_write_vert(parser_material_kong, "output.tex_coord1 = input.tex1;");
|
||||
|
||||
Reference in New Issue
Block a user