Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / mesa / main / shaders.h
1 /*
2 * Mesa 3-D graphics library
3 * Version: 6.5.3
4 *
5 * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26 #ifndef SHADERS_H
27 #define SHADERS_H
28
29
30 #include "glheader.h"
31 #include "mtypes.h"
32
33
34 extern void GLAPIENTRY
35 _mesa_DeleteObjectARB(GLhandleARB obj);
36
37 extern GLhandleARB GLAPIENTRY
38 _mesa_GetHandleARB(GLenum pname);
39
40 extern void GLAPIENTRY
41 _mesa_DetachObjectARB (GLhandleARB, GLhandleARB);
42
43 extern GLhandleARB GLAPIENTRY
44 _mesa_CreateShaderObjectARB (GLenum);
45
46 extern void GLAPIENTRY
47 _mesa_ShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
48
49 extern void GLAPIENTRY
50 _mesa_CompileShaderARB (GLhandleARB);
51
52 extern GLhandleARB GLAPIENTRY
53 _mesa_CreateProgramObjectARB (void);
54
55 extern void GLAPIENTRY
56 _mesa_AttachObjectARB (GLhandleARB, GLhandleARB);
57
58 extern void GLAPIENTRY
59 _mesa_LinkProgramARB (GLhandleARB);
60
61 extern void GLAPIENTRY
62 _mesa_UseProgramObjectARB (GLhandleARB);
63
64 extern void GLAPIENTRY
65 _mesa_ValidateProgramARB (GLhandleARB);
66
67 extern void GLAPIENTRY
68 _mesa_Uniform1fARB (GLint, GLfloat);
69
70 extern void GLAPIENTRY
71 _mesa_Uniform2fARB (GLint, GLfloat, GLfloat);
72
73 extern void GLAPIENTRY
74 _mesa_Uniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
75
76 extern void GLAPIENTRY
77 _mesa_Uniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
78
79 extern void GLAPIENTRY
80 _mesa_Uniform1iARB (GLint, GLint);
81
82 extern void GLAPIENTRY
83 _mesa_Uniform2iARB (GLint, GLint, GLint);
84
85 extern void GLAPIENTRY
86 _mesa_Uniform3iARB (GLint, GLint, GLint, GLint);
87
88 extern void GLAPIENTRY
89 _mesa_Uniform4iARB (GLint, GLint, GLint, GLint, GLint);
90
91 extern void GLAPIENTRY
92 _mesa_Uniform1fvARB (GLint, GLsizei, const GLfloat *);
93
94 extern void GLAPIENTRY
95 _mesa_Uniform2fvARB (GLint, GLsizei, const GLfloat *);
96
97 extern void GLAPIENTRY
98 _mesa_Uniform3fvARB (GLint, GLsizei, const GLfloat *);
99
100 extern void GLAPIENTRY
101 _mesa_Uniform4fvARB (GLint, GLsizei, const GLfloat *);
102
103 extern void GLAPIENTRY
104 _mesa_Uniform1ivARB (GLint, GLsizei, const GLint *);
105
106 extern void GLAPIENTRY
107 _mesa_Uniform2ivARB (GLint, GLsizei, const GLint *);
108
109 extern void GLAPIENTRY
110 _mesa_Uniform3ivARB (GLint, GLsizei, const GLint *);
111
112 extern void GLAPIENTRY
113 _mesa_Uniform4ivARB (GLint, GLsizei, const GLint *);
114
115 extern void GLAPIENTRY
116 _mesa_UniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
117
118 extern void GLAPIENTRY
119 _mesa_UniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
120
121 extern void GLAPIENTRY
122 _mesa_UniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
123
124 extern void GLAPIENTRY
125 _mesa_GetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
126
127 extern void GLAPIENTRY
128 _mesa_GetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
129
130 extern void GLAPIENTRY
131 _mesa_GetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
132
133 extern void GLAPIENTRY
134 _mesa_GetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
135
136 extern GLint GLAPIENTRY
137 _mesa_GetUniformLocationARB (GLhandleARB, const GLcharARB *);
138
139 extern void GLAPIENTRY
140 _mesa_GetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
141
142 extern void GLAPIENTRY
143 _mesa_GetUniformfvARB (GLhandleARB, GLint, GLfloat *);
144
145 extern void GLAPIENTRY
146 _mesa_GetUniformivARB (GLhandleARB, GLint, GLint *);
147
148 extern void GLAPIENTRY
149 _mesa_GetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
150
151 #if FEATURE_ARB_vertex_shader
152
153 extern void GLAPIENTRY
154 _mesa_BindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
155
156 extern void GLAPIENTRY
157 _mesa_GetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
158
159 extern GLint GLAPIENTRY
160 _mesa_GetAttribLocationARB (GLhandleARB, const GLcharARB *);
161
162 #endif /* FEATURE_ARB_vertex_shader */
163
164
165 /* 2.0 */
166 extern void GLAPIENTRY
167 _mesa_AttachShader(GLuint program, GLuint shader);
168
169 extern GLuint GLAPIENTRY
170 _mesa_CreateShader(GLenum);
171
172 extern GLuint GLAPIENTRY
173 _mesa_CreateProgram(void);
174
175 extern void GLAPIENTRY
176 _mesa_DeleteProgram(GLuint program);
177
178 extern void GLAPIENTRY
179 _mesa_DeleteShader(GLuint shader);
180
181 extern void GLAPIENTRY
182 _mesa_DetachShader(GLuint program, GLuint shader);
183
184 extern void GLAPIENTRY
185 _mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
186 GLsizei *count, GLuint *obj);
187
188 extern void GLAPIENTRY
189 _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params);
190
191 extern void GLAPIENTRY
192 _mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
193 GLsizei *length, GLchar *infoLog);
194
195 extern void GLAPIENTRY
196 _mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params);
197
198 extern void GLAPIENTRY
199 _mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
200 GLsizei *length, GLchar *infoLog);
201
202 extern GLboolean GLAPIENTRY
203 _mesa_IsProgram(GLuint program);
204
205 extern GLboolean GLAPIENTRY
206 _mesa_IsShader(GLuint shader);
207
208
209
210 /* 2.1 */
211 extern void GLAPIENTRY
212 _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
213 const GLfloat *value);
214
215 extern void GLAPIENTRY
216 _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
217 const GLfloat *value);
218
219 extern void GLAPIENTRY
220 _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
221 const GLfloat *value);
222
223 extern void GLAPIENTRY
224 _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
225 const GLfloat *value);
226
227 extern void GLAPIENTRY
228 _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
229 const GLfloat *value);
230
231 extern void GLAPIENTRY
232 _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
233 const GLfloat *value);
234
235
236 #endif /* SHADERS_H */