summaryrefslogtreecommitdiff
path: root/progs/util/shaderutil.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-12 13:50:26 -0600
committerBrian Paul <brianp@vmware.com>2009-08-12 17:28:45 -0600
commit378bff0eddf004d131a4c83194fb3e83492c4c37 (patch)
treee2691a72a8e680258261be654f92ef9ee8bc16e0 /progs/util/shaderutil.h
parent434ec3ada841915a00ffc23f699401eb3e7b37ee (diff)
progs/util: added more shader utility functions
Diffstat (limited to 'progs/util/shaderutil.h')
-rw-r--r--progs/util/shaderutil.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/progs/util/shaderutil.h b/progs/util/shaderutil.h
index cfb8c1f3b0..607ed28491 100644
--- a/progs/util/shaderutil.h
+++ b/progs/util/shaderutil.h
@@ -6,7 +6,7 @@
struct uniform_info
{
const char *name;
- GLuint size;
+ GLuint size; /**< number of value[] elements: 1, 2, 3 or 4 */
GLenum type; /**< GL_FLOAT or GL_INT */
GLfloat value[4];
GLint location; /**< filled in by InitUniforms() */
@@ -15,6 +15,15 @@ struct uniform_info
#define END_OF_UNIFORMS { NULL, 0, GL_NONE, { 0, 0, 0, 0 }, -1 }
+struct attrib_info
+{
+ const char *name;
+ GLuint size; /**< number of value[] elements: 1, 2, 3 or 4 */
+ GLenum type; /**< GL_FLOAT or GL_INT */
+ GLint location;
+};
+
+
extern GLboolean
ShadersSupported(void);
@@ -30,5 +39,16 @@ LinkShaders(GLuint vertShader, GLuint fragShader);
extern void
InitUniforms(GLuint program, struct uniform_info uniforms[]);
+extern GLuint
+GetUniforms(GLuint program, struct uniform_info uniforms[]);
+
+extern void
+PrintUniforms(const struct uniform_info uniforms[]);
+
+extern GLuint
+GetAttribs(GLuint program, struct attrib_info attribs[]);
+
+extern void
+PrintAttribs(const struct attrib_info attribs[]);
#endif /* SHADER_UTIL_H */