Set up a multipass shader
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include "../../util/array.h"
|
||||
|
||||
#define SHADER_UNIFORM_NAME_MAX 24
|
||||
#define SHADER_UNIFORM_COUNT 8
|
||||
#define SHADER_UNIFORM_COUNT 16
|
||||
|
||||
/** Representation of a shader uniform */
|
||||
typedef GLuint shaderuniform_t;
|
||||
@@ -27,14 +27,23 @@ typedef struct {
|
||||
shaderuniform_t shaderVertex;
|
||||
|
||||
/** Pointer to an uploaded fragment shader program */
|
||||
shaderuniform_t shaderFrag;
|
||||
GLuint shaderFrag;
|
||||
|
||||
/** Pointer to an uploaded shader program linked */
|
||||
shaderuniform_t shaderProgram;
|
||||
GLuint shaderProgram;
|
||||
|
||||
/** Buffer of chars where we store the uniform names */
|
||||
char uniformBuffer[SHADER_UNIFORM_NAME_MAX * SHADER_UNIFORM_COUNT];
|
||||
char *uniforms[SHADER_UNIFORM_COUNT];
|
||||
|
||||
/** Array of strings (pointers to the above buffer) of the uniform names */
|
||||
char *uniformNames[SHADER_UNIFORM_COUNT];
|
||||
int32_t uniformCount;
|
||||
|
||||
/** Type of each uniform */
|
||||
GLenum types[SHADER_UNIFORM_COUNT];
|
||||
|
||||
/** Texture Slots (which texture slot for GL to use for each uniform) */
|
||||
uint8_t textureSlots[SHADER_UNIFORM_COUNT];
|
||||
} shader_t;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user