Optimized

This commit is contained in:
2026-07-11 23:51:39 -05:00
parent b9195fbbad
commit 6a43363539
40 changed files with 386 additions and 190 deletions
+9
View File
@@ -30,6 +30,9 @@ typedef struct {
#endif
} shaderdefinitiongl_t;
/** Number of distinct uniform names a single shader instance can cache. */
#define SHADERGL_MAX_CACHED_UNIFORMS 8
typedef struct shadergl_s {
const shaderdefinitiongl_t *definition;
@@ -41,6 +44,12 @@ typedef struct shadergl_s {
GLuint shaderProgramId;
GLuint vertexShaderId;
GLuint fragmentShaderId;
struct {
const char_t *name;
GLint location;
} uniformCache[SHADERGL_MAX_CACHED_UNIFORMS];
uint8_t uniformCacheCount;
#endif
} shadergl_t;