src/scene.c

changeset 82
4e1e698f4b0d
parent 76
eb16be99b0ad
child 83
f7ce0db6f72b
--- a/src/scene.c	Fri Apr 18 20:13:01 2025 +0200
+++ b/src/scene.c	Sat Apr 19 11:42:53 2025 +0200
@@ -30,12 +30,13 @@
 #include "ascension/context.h"
 #include "ascension/utils.h"
 
+#include "ascension/2d.h"
+
 #include <cx/linked_list.h>
 #include <cx/array_list.h>
 #include <cx/tree.h>
 #include <cx/utils.h>
 
-#include "ascension/shader.h"
 #include <GL/glew.h>
 
 #include <assert.h>
@@ -58,24 +59,6 @@
     );
 }
 
-static void asc_sprite_draw(AscSprite const *node) {
-    // Obtain shader
-    AscShaderSprite *shader = ASC_SHADER_SPRITE;
-
-    // Upload model matrix
-    glUniformMatrix4fv(shader->program.model, 1,
-                       GL_FALSE, node->data.world_transform);
-
-    // Bind texture
-    asc_texture_bind(&node->tex, shader->tex, 0);
-
-    // Apply depth
-    glUniform1f(shader->depth, (float)(node->data.depth));
-
-    // Draw mesh
-    asc_primitives_draw_plane();
-}
-
 void asc_scene_draw(AscSceneNode *root, asc_recti viewport, AscCamera *camera) {
     // create render groups
     CxList *render_group[ASC_RENDER_GROUP_COUNT];

mercurial