mesa: Restore 78-column wrapping of license text in C-style comments.
[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 OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26
27 #ifndef SHADERAPI_H
28 #define SHADERAPI_H
29
30
31 #include "glheader.h"
32
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38
39 struct _glapi_table;
40 struct gl_context;
41 struct gl_shader_program;
42
43 extern void
44 _mesa_copy_string(GLchar *dst, GLsizei maxLength,
45 GLsizei *length, const GLchar *src);
46
47 extern void
48 _mesa_use_program(struct gl_context *ctx, struct gl_shader_program *shProg);
49
50 extern void
51 _mesa_active_program(struct gl_context *ctx, struct gl_shader_program *shProg,
52 const char *caller);
53
54 extern unsigned
55 _mesa_count_active_attribs(struct gl_shader_program *shProg);
56
57 extern size_t
58 _mesa_longest_attribute_name_length(struct gl_shader_program *shProg);
59
60 extern void GLAPIENTRY
61 _mesa_AttachObjectARB(GLhandleARB, GLhandleARB);
62
63 extern void GLAPIENTRY
64 _mesa_CompileShader(GLhandleARB);
65
66 extern GLhandleARB GLAPIENTRY
67 _mesa_CreateProgramObjectARB(void);
68
69 extern GLhandleARB GLAPIENTRY
70 _mesa_CreateShaderObjectARB(GLenum type);
71
72 extern void GLAPIENTRY
73 _mesa_DeleteObjectARB(GLhandleARB obj);
74
75 extern void GLAPIENTRY
76 _mesa_DetachObjectARB(GLhandleARB, GLhandleARB);
77
78 extern void GLAPIENTRY
79 _mesa_GetAttachedObjectsARB(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
80
81 extern GLint GLAPIENTRY
82 _mesa_GetFragDataLocation(GLuint program, const GLchar *name);
83
84 extern GLint GLAPIENTRY
85 _mesa_GetFragDataIndex(GLuint program, const GLchar *name);
86
87 extern GLhandleARB GLAPIENTRY
88 _mesa_GetHandleARB(GLenum pname);
89
90 extern void GLAPIENTRY
91 _mesa_GetInfoLogARB(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
92
93 extern void GLAPIENTRY
94 _mesa_GetObjectParameterfvARB(GLhandleARB, GLenum, GLfloat *);
95
96 extern void GLAPIENTRY
97 _mesa_GetObjectParameterivARB(GLhandleARB, GLenum, GLint *);
98
99 extern void GLAPIENTRY
100 _mesa_GetShaderSource(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
101
102 extern GLboolean GLAPIENTRY
103 _mesa_IsProgram(GLuint name);
104
105 extern GLboolean GLAPIENTRY
106 _mesa_IsShader(GLuint name);
107
108 extern void GLAPIENTRY
109 _mesa_LinkProgram(GLhandleARB programObj);
110
111 extern void GLAPIENTRY
112 _mesa_ShaderSource(GLhandleARB, GLsizei, const GLcharARB* const *, const GLint *);
113
114 extern void GLAPIENTRY
115 _mesa_UseProgram(GLhandleARB);
116
117 extern void GLAPIENTRY
118 _mesa_ValidateProgram(GLhandleARB);
119
120
121 extern void GLAPIENTRY
122 _mesa_BindAttribLocation(GLhandleARB, GLuint, const GLcharARB *);
123
124 extern void GLAPIENTRY
125 _mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
126 const GLchar *name);
127
128 extern void GLAPIENTRY
129 _mesa_BindFragDataLocationIndexed(GLuint program, GLuint colorNumber,
130 GLuint index, const GLchar *name);
131
132 extern void GLAPIENTRY
133 _mesa_GetActiveAttrib(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *,
134 GLenum *, GLcharARB *);
135
136 extern GLint GLAPIENTRY
137 _mesa_GetAttribLocation(GLhandleARB, const GLcharARB *);
138
139
140
141 extern void GLAPIENTRY
142 _mesa_AttachShader(GLuint program, GLuint shader);
143
144 extern GLuint GLAPIENTRY
145 _mesa_CreateShader(GLenum);
146
147 extern GLuint GLAPIENTRY
148 _mesa_CreateProgram(void);
149
150 extern void GLAPIENTRY
151 _mesa_DeleteProgram(GLuint program);
152
153 extern void GLAPIENTRY
154 _mesa_DeleteShader(GLuint shader);
155
156 extern void GLAPIENTRY
157 _mesa_DetachShader(GLuint program, GLuint shader);
158
159 extern void GLAPIENTRY
160 _mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
161 GLsizei *count, GLuint *obj);
162
163 extern void GLAPIENTRY
164 _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params);
165
166 extern void GLAPIENTRY
167 _mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
168 GLsizei *length, GLchar *infoLog);
169
170 extern void GLAPIENTRY
171 _mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params);
172
173 extern void GLAPIENTRY
174 _mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
175 GLsizei *length, GLchar *infoLog);
176
177
178 extern void GLAPIENTRY
179 _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
180 GLint *range, GLint *precision);
181
182 extern void GLAPIENTRY
183 _mesa_ReleaseShaderCompiler(void);
184
185 extern void GLAPIENTRY
186 _mesa_ShaderBinary(GLint n, const GLuint *shaders, GLenum binaryformat,
187 const void* binary, GLint length);
188
189 extern void GLAPIENTRY
190 _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
191 GLenum *binaryFormat, GLvoid *binary);
192
193 extern void GLAPIENTRY
194 _mesa_ProgramBinary(GLuint program, GLenum binaryFormat,
195 const GLvoid *binary, GLsizei length);
196
197 extern void GLAPIENTRY
198 _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value);
199
200 void
201 _mesa_use_shader_program(struct gl_context *ctx, GLenum type,
202 struct gl_shader_program *shProg);
203
204 extern void GLAPIENTRY
205 _mesa_UseShaderProgramEXT(GLenum type, GLuint program);
206
207 extern void GLAPIENTRY
208 _mesa_ActiveProgramEXT(GLuint program);
209
210 extern GLuint GLAPIENTRY
211 _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string);
212
213
214 #ifdef __cplusplus
215 }
216 #endif
217
218 #endif /* SHADERAPI_H */