Added matrix

This commit is contained in:
2021-07-12 10:22:33 -07:00
parent df2ee3bf1b
commit e990d28a1f
11 changed files with 250 additions and 64 deletions

View File

@ -13,29 +13,32 @@
#define SHADER_UNI_TEXT "u_Text"
#define SHADER_UNI_MODL "u_Modl"
/** Representation of a shader uniform */
typedef GLuint shaderuniform_t;
/**
* Structure containing information about an OpenGL Shader. For simplicity sake
* we demand certain uninforms to be present on the shader target.
*/
typedef struct {
/** Pointer to an uploaded vertex shader program */
GLuint shaderVertex;
shaderuniform_t shaderVertex;
/** Pointer to an uploaded fragment shader program */
GLuint shaderFrag;
shaderuniform_t shaderFrag;
/** Pointer to an uploaded shader program linked */
GLuint shaderProgram;
shaderuniform_t shaderProgram;
/** Matrix for the view matrix */
GLint uniView;
shaderuniform_t uniView;
/** Matrix for the projection matrix */
GLint uniProj;
shaderuniform_t uniProj;
/** Uniform for the current texture */
GLint uniText;
shaderuniform_t uniText;
/** Uniform for the current model world position */
GLint uniModl;
shaderuniform_t uniModl;
} shader_t;