diff options
author | marha <marha@users.sourceforge.net> | 2009-10-09 06:31:44 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-10-09 06:31:44 +0000 |
commit | 06456f5db88b434c3634ede42bdbfdce78fc4249 (patch) | |
tree | 97f5174e2d3da40faee7f2ad8858233da3d0166e /mesalib/progs/util/shaderutil.h | |
parent | 7b230a3fe2d6c83488d9eec43067fe8ba8ac081b (diff) | |
parent | a0c4815433ccd57322f4f7703ca35e9ccfa59250 (diff) | |
download | vcxsrv-06456f5db88b434c3634ede42bdbfdce78fc4249.tar.gz vcxsrv-06456f5db88b434c3634ede42bdbfdce78fc4249.tar.bz2 vcxsrv-06456f5db88b434c3634ede42bdbfdce78fc4249.zip |
svn merge ^/branches/released . --username marha
Diffstat (limited to 'mesalib/progs/util/shaderutil.h')
-rw-r--r-- | mesalib/progs/util/shaderutil.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/mesalib/progs/util/shaderutil.h b/mesalib/progs/util/shaderutil.h new file mode 100644 index 000000000..98c718115 --- /dev/null +++ b/mesalib/progs/util/shaderutil.h @@ -0,0 +1,63 @@ +#ifndef SHADER_UTIL_H +#define SHADER_UTIL_H + + + +struct uniform_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 */ + GLfloat value[4]; + GLint location; /**< filled in by InitUniforms() */ +}; + +#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); + +extern GLuint +CompileShaderText(GLenum shaderType, const char *text); + +extern GLuint +CompileShaderFile(GLenum shaderType, const char *filename); + +extern GLuint +LinkShaders(GLuint vertShader, GLuint fragShader); + +extern GLboolean +ValidateShaderProgram(GLuint program); + +extern GLdouble +GetShaderCompileTime(void); + +extern GLdouble +GetShaderLinkTime(void); + +extern void +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 */ |