Gawain: use ShaderInterface to manage uniforms
This eliminates tons of glGetUniformLocation calls from the drawing loop. Vast majority of code can keep making the same function calls. They're just faster now! - Batch_Uniform* - immUniform* - gpuBindMatrices - and others
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "BLI_sys_types.h"
|
||||
#include "GPU_glew.h"
|
||||
#include "../../../intern/gawain/gawain/shader_interface.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -132,7 +133,7 @@ const float *gpuGetNormalMatrixInverse(float m[3][3]);
|
||||
|
||||
|
||||
/* set uniform values for currently bound shader */
|
||||
void gpuBindMatrices(GLuint program);
|
||||
void gpuBindMatrices(const ShaderInterface*);
|
||||
bool gpuMatricesDirty(void); /* since last bind */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user