mesa: Standardize names of OpenGL functions.
[mesa.git] / src / mesa / main / shaderapi.h
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
5 * Copyright (C) 2010 VMware, Inc. 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 * THE AUTHORS 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 SHADERAPI_H
27 #define SHADERAPI_H
28
29
30 #include "glheader.h"
31
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37
38 struct _glapi_table;
39 struct gl_context;
40 struct gl_shader_program;
41
42 extern void
43 _mesa_copy_string(GLchar *dst, GLsizei maxLength,
44 GLsizei *length, const GLchar *src);
45
46 extern void
47 _mesa_use_program(struct gl_context *ctx, struct gl_shader_program *shProg);
48
49 extern void
50 _mesa_active_program(struct gl_context *ctx, struct gl_shader_program *shProg,
51 const char *caller);
52
53 extern void
54 _mesa_init_shader_dispatch(const struct gl_context *ctx,
55 struct _glapi_table *exec);
56
57 extern unsigned
58 _mesa_count_active_attribs(struct gl_shader_program *shProg);
59
60 extern size_t
61 _mesa_longest_attribute_name_length(struct gl_shader_program *shProg);
62
63 extern void GLAPIENTRY
64 _mesa_AttachObjectARB(GLhandleARB, GLhandleARB);
65
66 extern void GLAPIENTRY
67 _mesa_CompileShader(GLhandleARB);
68
69 extern GLhandleARB GLAPIENTRY
70 _mesa_CreateProgramObjectARB(void);
71
72 extern GLhandleARB GLAPIENTRY
73 _mesa_CreateShaderObjectARB(GLenum type);
74
75 extern void GLAPIENTRY
76 _mesa_DeleteObjectARB(GLhandleARB obj);
77
78 extern void GLAPIENTRY
79 _mesa_DetachObjectARB(GLhandleARB, GLhandleARB);
80
81 extern void GLAPIENTRY
82 _mesa_GetAttachedObjectsARB(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
83
84 extern GLint GLAPIENTRY
85 _mesa_GetFragDataLocation(GLuint program, const GLchar *name);
86
87 extern GLint GLAPIENTRY
88 _mesa_GetFragDataIndex(GLuint program, const GLchar *name);
89
90 extern GLhandleARB GLAPIENTRY
91 _mesa_GetHandleARB(GLenum pname);
92
93 extern void GLAPIENTRY
94 _mesa_GetInfoLogARB(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
95
96 extern void GLAPIENTRY
97 _mesa_GetObjectParameterfvARB(GLhandleARB, GLenum, GLfloat *);
98
99 extern void GLAPIENTRY
100 _mesa_GetObjectParameterivARB(GLhandleARB, GLenum, GLint *);
101
102 extern void GLAPIENTRY
103 _mesa_GetShaderSource(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
104
105 extern GLboolean GLAPIENTRY
106 _mesa_IsProgram(GLuint name);
107
108 extern GLboolean GLAPIENTRY
109 _mesa_IsShader(GLuint name);
110
111 extern void GLAPIENTRY
112 _mesa_LinkProgram(GLhandleARB programObj);
113
114 extern void GLAPIENTRY
115 _mesa_ShaderSource(GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
116
117 extern void GLAPIENTRY
118 _mesa_UseProgram(GLhandleARB);
119
120 extern void GLAPIENTRY
121 _mesa_ValidateProgram(GLhandleARB);
122
123
124 extern void GLAPIENTRY
125 _mesa_BindAttribLocation(GLhandleARB, GLuint, const GLcharARB *);
126
127 extern void GLAPIENTRY
128 _mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
129 const GLchar *name);
130
131 extern void GLAPIENTRY
132 _mesa_BindFragDataLocationIndexed(GLuint program, GLuint colorNumber,
133 GLuint index, const GLchar *name);
134
135 extern void GLAPIENTRY
136 _mesa_GetActiveAttrib(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *,
137 GLenum *, GLcharARB *);
138
139 extern GLint GLAPIENTRY
140 _mesa_GetAttribLocation(GLhandleARB, const GLcharARB *);
141
142
143
144 extern void GLAPIENTRY
145 _mesa_AttachShader(GLuint program, GLuint shader);
146
147 extern GLuint GLAPIENTRY
148 _mesa_CreateShader(GLenum);
149
150 extern GLuint GLAPIENTRY
151 _mesa_CreateProgram(void);
152
153 extern void GLAPIENTRY
154 _mesa_DeleteProgram(GLuint program);
155
156 extern void GLAPIENTRY
157 _mesa_DeleteShader(GLuint shader);
158
159 extern void GLAPIENTRY
160 _mesa_DetachShader(GLuint program, GLuint shader);
161
162 extern void GLAPIENTRY
163 _mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
164 GLsizei *count, GLuint *obj);
165
166 extern void GLAPIENTRY
167 _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params);
168
169 extern void GLAPIENTRY
170 _mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
171 GLsizei *length, GLchar *infoLog);
172
173 extern void GLAPIENTRY
174 _mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params);
175
176 extern void GLAPIENTRY
177 _mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
178 GLsizei *length, GLchar *infoLog);
179
180
181 extern void GLAPIENTRY
182 _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
183 GLint *range, GLint *precision);
184
185 extern void GLAPIENTRY
186 _mesa_ReleaseShaderCompiler(void);
187
188 extern void GLAPIENTRY
189 _mesa_ShaderBinary(GLint n, const GLuint *shaders, GLenum binaryformat,
190 const void* binary, GLint length);
191
192 extern void GLAPIENTRY
193 _mesa_ProgramParameteriARB(GLuint program, GLenum pname,
194 GLint value);
195 void
196 _mesa_use_shader_program(struct gl_context *ctx, GLenum type,
197 struct gl_shader_program *shProg);
198
199 extern void GLAPIENTRY
200 _mesa_UseShaderProgramEXT(GLenum type, GLuint program);
201
202 extern void GLAPIENTRY
203 _mesa_ActiveProgramEXT(GLuint program);
204
205 extern GLuint GLAPIENTRY
206 _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string);
207
208
209 #ifdef __cplusplus
210 }
211 #endif
212
213 #endif /* SHADERAPI_H */