refactor: disable shader injection

This commit is contained in:
Nova
2023-06-26 20:49:21 -04:00
parent 80d292b511
commit 641db4face
5 changed files with 88 additions and 91 deletions

View File

@@ -1,10 +1,7 @@
use super::{
shaders::{PANEL_SHADER_BYTES, SIMULA_FRAG_STR, SIMULA_VERT_STR},
state::WaylandState,
};
use super::{shaders::PANEL_SHADER_BYTES, state::WaylandState};
use crate::{
core::{delta::Delta, destroy_queue, registry::Registry},
nodes::drawable::{model::ModelPart, shaders::shader_inject},
nodes::drawable::model::ModelPart,
};
use mint::Vector2;
use once_cell::sync::OnceCell;
@@ -98,10 +95,10 @@ impl CoreSurface {
SendWrapper::new(sk.tex_create(TextureType::IMAGE_NO_MIPS, TextureFormat::RGBA32))
});
self.sk_mat.get_or_init(|| {
let mut shader = sk.shader_create_mem(&PANEL_SHADER_BYTES).unwrap();
let _ = renderer.with_context(|c| unsafe {
shader_inject(c, &mut shader, SIMULA_VERT_STR, SIMULA_FRAG_STR)
});
let shader = sk.shader_create_mem(&PANEL_SHADER_BYTES).unwrap();
// let _ = renderer.with_context(|c| unsafe {
// shader_inject(c, &mut shader, SIMULA_VERT_STR, SIMULA_FRAG_STR)
// });
let mat = sk.material_create(&shader);
sk.material_set_texture(&mat, "diffuse", sk_tex.as_ref());