summaryrefslogtreecommitdiff
path: root/progs/util/shaderutil.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-08-18 12:20:36 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-08-18 12:20:36 -0700
commita512985fd81c1ed4ccc5e69aaa05015cf7ff844d (patch)
tree69e6e898deaeaed2b4dfb5851707c68261c464de /progs/util/shaderutil.h
parent0b5af41c6fae2809f4567a7cecbd207e5e4f3ab5 (diff)
parentc80bc3abcd3939e5e2d45aea4b01ff22bfec244b (diff)
Merge branch 'master' into asm-shader-rework-1
Conflicts: src/mesa/shader/arbprogparse.c
Diffstat (limited to 'progs/util/shaderutil.h')
-rw-r--r--progs/util/shaderutil.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/progs/util/shaderutil.h b/progs/util/shaderutil.h
index cfb8c1f3b0..0a6be02675 100644
--- a/progs/util/shaderutil.h
+++ b/progs/util/shaderutil.h
@@ -6,8 +6,8 @@
struct uniform_info
{
const char *name;
- GLuint size;
- GLenum type; /**< GL_FLOAT or GL_INT */
+ GLuint size; /**< number of value[] elements: 1, 2, 3 or 4 */
+ GLenum type; /**< GL_FLOAT, GL_FLOAT_VEC4, GL_INT, etc */
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, GL_FLOAT_VEC4, GL_INT, etc */
+ GLint location;
+};
+
+
extern GLboolean
ShadersSupported(void);
@@ -28,7 +37,18 @@ extern GLuint
LinkShaders(GLuint vertShader, GLuint fragShader);
extern void
-InitUniforms(GLuint program, struct uniform_info uniforms[]);
+SetUniformValues(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 */