2 * Mesa 3-D graphics library
4 * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
5 * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
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:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
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.
40 struct gl_shader_program
;
43 _mesa_copy_string(GLchar
*dst
, GLsizei maxLength
,
44 GLsizei
*length
, const GLchar
*src
);
47 _mesa_use_program(struct gl_context
*ctx
, struct gl_shader_program
*shProg
);
50 _mesa_active_program(struct gl_context
*ctx
, struct gl_shader_program
*shProg
,
54 _mesa_count_active_attribs(struct gl_shader_program
*shProg
);
57 _mesa_longest_attribute_name_length(struct gl_shader_program
*shProg
);
59 extern void GLAPIENTRY
60 _mesa_AttachObjectARB(GLhandleARB
, GLhandleARB
);
62 extern void GLAPIENTRY
63 _mesa_CompileShader(GLhandleARB
);
65 extern GLhandleARB GLAPIENTRY
66 _mesa_CreateProgramObjectARB(void);
68 extern GLhandleARB GLAPIENTRY
69 _mesa_CreateShaderObjectARB(GLenum type
);
71 extern void GLAPIENTRY
72 _mesa_DeleteObjectARB(GLhandleARB obj
);
74 extern void GLAPIENTRY
75 _mesa_DetachObjectARB(GLhandleARB
, GLhandleARB
);
77 extern void GLAPIENTRY
78 _mesa_GetAttachedObjectsARB(GLhandleARB
, GLsizei
, GLsizei
*, GLhandleARB
*);
80 extern GLint GLAPIENTRY
81 _mesa_GetFragDataLocation(GLuint program
, const GLchar
*name
);
83 extern GLint GLAPIENTRY
84 _mesa_GetFragDataIndex(GLuint program
, const GLchar
*name
);
86 extern GLhandleARB GLAPIENTRY
87 _mesa_GetHandleARB(GLenum pname
);
89 extern void GLAPIENTRY
90 _mesa_GetInfoLogARB(GLhandleARB
, GLsizei
, GLsizei
*, GLcharARB
*);
92 extern void GLAPIENTRY
93 _mesa_GetObjectParameterfvARB(GLhandleARB
, GLenum
, GLfloat
*);
95 extern void GLAPIENTRY
96 _mesa_GetObjectParameterivARB(GLhandleARB
, GLenum
, GLint
*);
98 extern void GLAPIENTRY
99 _mesa_GetShaderSource(GLhandleARB
, GLsizei
, GLsizei
*, GLcharARB
*);
101 extern GLboolean GLAPIENTRY
102 _mesa_IsProgram(GLuint name
);
104 extern GLboolean GLAPIENTRY
105 _mesa_IsShader(GLuint name
);
107 extern void GLAPIENTRY
108 _mesa_LinkProgram(GLhandleARB programObj
);
110 extern void GLAPIENTRY
111 _mesa_ShaderSource(GLhandleARB
, GLsizei
, const GLcharARB
* const *, const GLint
*);
113 extern void GLAPIENTRY
114 _mesa_UseProgram(GLhandleARB
);
116 extern void GLAPIENTRY
117 _mesa_ValidateProgram(GLhandleARB
);
120 extern void GLAPIENTRY
121 _mesa_BindAttribLocation(GLhandleARB
, GLuint
, const GLcharARB
*);
123 extern void GLAPIENTRY
124 _mesa_BindFragDataLocation(GLuint program
, GLuint colorNumber
,
127 extern void GLAPIENTRY
128 _mesa_BindFragDataLocationIndexed(GLuint program
, GLuint colorNumber
,
129 GLuint index
, const GLchar
*name
);
131 extern void GLAPIENTRY
132 _mesa_GetActiveAttrib(GLhandleARB
, GLuint
, GLsizei
, GLsizei
*, GLint
*,
133 GLenum
*, GLcharARB
*);
135 extern GLint GLAPIENTRY
136 _mesa_GetAttribLocation(GLhandleARB
, const GLcharARB
*);
140 extern void GLAPIENTRY
141 _mesa_AttachShader(GLuint program
, GLuint shader
);
143 extern GLuint GLAPIENTRY
144 _mesa_CreateShader(GLenum
);
146 extern GLuint GLAPIENTRY
147 _mesa_CreateProgram(void);
149 extern void GLAPIENTRY
150 _mesa_DeleteProgram(GLuint program
);
152 extern void GLAPIENTRY
153 _mesa_DeleteShader(GLuint shader
);
155 extern void GLAPIENTRY
156 _mesa_DetachShader(GLuint program
, GLuint shader
);
158 extern void GLAPIENTRY
159 _mesa_GetAttachedShaders(GLuint program
, GLsizei maxCount
,
160 GLsizei
*count
, GLuint
*obj
);
162 extern void GLAPIENTRY
163 _mesa_GetProgramiv(GLuint program
, GLenum pname
, GLint
*params
);
165 extern void GLAPIENTRY
166 _mesa_GetProgramInfoLog(GLuint program
, GLsizei bufSize
,
167 GLsizei
*length
, GLchar
*infoLog
);
169 extern void GLAPIENTRY
170 _mesa_GetShaderiv(GLuint shader
, GLenum pname
, GLint
*params
);
172 extern void GLAPIENTRY
173 _mesa_GetShaderInfoLog(GLuint shader
, GLsizei bufSize
,
174 GLsizei
*length
, GLchar
*infoLog
);
177 extern void GLAPIENTRY
178 _mesa_GetShaderPrecisionFormat(GLenum shadertype
, GLenum precisiontype
,
179 GLint
*range
, GLint
*precision
);
181 extern void GLAPIENTRY
182 _mesa_ReleaseShaderCompiler(void);
184 extern void GLAPIENTRY
185 _mesa_ShaderBinary(GLint n
, const GLuint
*shaders
, GLenum binaryformat
,
186 const void* binary
, GLint length
);
188 extern void GLAPIENTRY
189 _mesa_GetProgramBinary(GLuint program
, GLsizei bufSize
, GLsizei
*length
,
190 GLenum
*binaryFormat
, GLvoid
*binary
);
192 extern void GLAPIENTRY
193 _mesa_ProgramBinary(GLuint program
, GLenum binaryFormat
,
194 const GLvoid
*binary
, GLsizei length
);
196 extern void GLAPIENTRY
197 _mesa_ProgramParameteri(GLuint program
, GLenum pname
, GLint value
);
200 _mesa_use_shader_program(struct gl_context
*ctx
, GLenum type
,
201 struct gl_shader_program
*shProg
);
203 extern void GLAPIENTRY
204 _mesa_UseShaderProgramEXT(GLenum type
, GLuint program
);
206 extern void GLAPIENTRY
207 _mesa_ActiveProgramEXT(GLuint program
);
209 extern GLuint GLAPIENTRY
210 _mesa_CreateShaderProgramEXT(GLenum type
, const GLchar
*string
);
217 #endif /* SHADERAPI_H */