Optimized
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user