Moved texture setting around

This commit is contained in:
2026-03-28 09:48:24 -05:00
parent 9474a68995
commit 9ba0ceb000
8 changed files with 213 additions and 126 deletions
+15 -8
View File
@@ -9,28 +9,35 @@
#include "error/errorgl.h"
#include "display/texture/texture.h"
typedef struct {
typedef struct shadergl_s shadergl_t;
typedef errorret_t (*shadersettexturefn_t)(
shadergl_t *,
const char_t *,
texture_t *
);
typedef struct shadergl_s {
#ifdef DUSK_OPENGL_LEGACY
void *nothing;
mat4 view;
mat4 proj;
mat4 model;
#else
GLuint shaderProgramId;
GLuint vertexShaderId;
GLuint fragmentShaderId;
#endif
#if DUSK_OPENGL_LEGACY
mat4 view;
mat4 proj;
mat4 model;
shadersettexturefn_t setTexture;
#endif
} shadergl_t;
typedef struct {
#ifdef DUSK_OPENGL_LEGACY
void *nothing;
#else
const char_t *vert;
const char_t *frag;
shadersettexturefn_t setTexture;
#endif
} shaderdefinitiongl_t;