src/shader.c

changeset 44
b3da4096c607
parent 41
df81d493716e
child 50
d8d2e4817db1
--- a/src/shader.c	Thu Mar 21 23:01:09 2024 +0100
+++ b/src/shader.c	Tue Mar 26 20:37:21 2024 +0100
@@ -126,7 +126,7 @@
     program.id = 0;
 }
 
-static AscShaderProgram asc_shader_compile_link_discard(
+AscShaderProgram asc_shader_easy_compile_and_link(
         char const *vtxName, char const *fragName) {
     AscShader font_vtx = asc_shader_compilef(GL_VERTEX_SHADER, vtxName);
     AscShader font_frag = asc_shader_compilef(GL_FRAGMENT_SHADER, fragName);
@@ -135,13 +135,3 @@
     asc_shader_destroy(font_frag);
     return prog;
 }
-
-void asc_shader_initialize_predefined(void) {
-    ASC_SHADER_SPRITE.base = asc_shader_compile_link_discard("shader/sprite_vtx.glsl", "shader/sprite_frag.glsl");
-    ASC_SHADER_SPRITE.surface = glGetUniformLocation(ASC_SHADER_SPRITE.base.id, "surface");
-    ASC_SHADER_SPRITE.depth = glGetUniformLocation(ASC_SHADER_SPRITE.base.id, "depth");
-}
-
-void asc_shader_destroy_predefined(void) {
-    asc_shader_program_destroy(ASC_SHADER_SPRITE.base);
-}
\ No newline at end of file

mercurial