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 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.
41 struct gl_shader_program
;
44 _mesa_copy_string(GLchar
*dst
, GLsizei maxLength
,
45 GLsizei
*length
, const GLchar
*src
);
48 _mesa_use_program(struct gl_context
*ctx
, struct gl_shader_program
*shProg
);
51 _mesa_active_program(struct gl_context
*ctx
, struct gl_shader_program
*shProg
,
55 _mesa_count_active_attribs(struct gl_shader_program
*shProg
);
58 _mesa_longest_attribute_name_length(struct gl_shader_program
*shProg
);
60 extern void GLAPIENTRY
61 _mesa_AttachObjectARB(GLhandleARB
, GLhandleARB
);
63 extern void GLAPIENTRY
64 _mesa_CompileShader(GLhandleARB
);
66 extern GLhandleARB GLAPIENTRY
67 _mesa_CreateProgramObjectARB(void);
69 extern GLhandleARB GLAPIENTRY
70 _mesa_CreateShaderObjectARB(GLenum type
);
72 extern void GLAPIENTRY
73 _mesa_DeleteObjectARB(GLhandleARB obj
);
75 extern void GLAPIENTRY
76 _mesa_DetachObjectARB(GLhandleARB
, GLhandleARB
);
78 extern void GLAPIENTRY
79 _mesa_GetAttachedObjectsARB(GLhandleARB
, GLsizei
, GLsizei
*, GLhandleARB
*);
81 extern GLint GLAPIENTRY
82 _mesa_GetFragDataLocation(GLuint program
, const GLchar
*name
);
84 extern GLint GLAPIENTRY
85 _mesa_GetFragDataIndex(GLuint program
, const GLchar
*name
);
87 extern GLhandleARB GLAPIENTRY
88 _mesa_GetHandleARB(GLenum pname
);
90 extern void GLAPIENTRY
91 _mesa_GetInfoLogARB(GLhandleARB
, GLsizei
, GLsizei
*, GLcharARB
*);
93 extern void GLAPIENTRY
94 _mesa_GetObjectParameterfvARB(GLhandleARB
, GLenum
, GLfloat
*);
96 extern void GLAPIENTRY
97 _mesa_GetObjectParameterivARB(GLhandleARB
, GLenum
, GLint
*);
99 extern void GLAPIENTRY
100 _mesa_GetShaderSource(GLhandleARB
, GLsizei
, GLsizei
*, GLcharARB
*);
102 extern GLboolean GLAPIENTRY
103 _mesa_IsProgram(GLuint name
);
105 extern GLboolean GLAPIENTRY
106 _mesa_IsShader(GLuint name
);
108 extern void GLAPIENTRY
109 _mesa_LinkProgram(GLhandleARB programObj
);
111 extern void GLAPIENTRY
112 _mesa_ShaderSource(GLhandleARB
, GLsizei
, const GLcharARB
* const *, const GLint
*);
114 extern void GLAPIENTRY
115 _mesa_UseProgram(GLhandleARB
);
117 extern void GLAPIENTRY
118 _mesa_ValidateProgram(GLhandleARB
);
121 extern void GLAPIENTRY
122 _mesa_BindAttribLocation(GLhandleARB
, GLuint
, const GLcharARB
*);
124 extern void GLAPIENTRY
125 _mesa_BindFragDataLocation(GLuint program
, GLuint colorNumber
,
128 extern void GLAPIENTRY
129 _mesa_BindFragDataLocationIndexed(GLuint program
, GLuint colorNumber
,
130 GLuint index
, const GLchar
*name
);
132 extern void GLAPIENTRY
133 _mesa_GetActiveAttrib(GLhandleARB
, GLuint
, GLsizei
, GLsizei
*, GLint
*,
134 GLenum
*, GLcharARB
*);
136 extern GLint GLAPIENTRY
137 _mesa_GetAttribLocation(GLhandleARB
, const GLcharARB
*);
141 extern void GLAPIENTRY
142 _mesa_AttachShader(GLuint program
, GLuint shader
);
144 extern GLuint GLAPIENTRY
145 _mesa_CreateShader(GLenum
);
147 extern GLuint GLAPIENTRY
148 _mesa_CreateProgram(void);
150 extern void GLAPIENTRY
151 _mesa_DeleteProgram(GLuint program
);
153 extern void GLAPIENTRY
154 _mesa_DeleteShader(GLuint shader
);
156 extern void GLAPIENTRY
157 _mesa_DetachShader(GLuint program
, GLuint shader
);
159 extern void GLAPIENTRY
160 _mesa_GetAttachedShaders(GLuint program
, GLsizei maxCount
,
161 GLsizei
*count
, GLuint
*obj
);
163 extern void GLAPIENTRY
164 _mesa_GetProgramiv(GLuint program
, GLenum pname
, GLint
*params
);
166 extern void GLAPIENTRY
167 _mesa_GetProgramInfoLog(GLuint program
, GLsizei bufSize
,
168 GLsizei
*length
, GLchar
*infoLog
);
170 extern void GLAPIENTRY
171 _mesa_GetShaderiv(GLuint shader
, GLenum pname
, GLint
*params
);
173 extern void GLAPIENTRY
174 _mesa_GetShaderInfoLog(GLuint shader
, GLsizei bufSize
,
175 GLsizei
*length
, GLchar
*infoLog
);
178 extern void GLAPIENTRY
179 _mesa_GetShaderPrecisionFormat(GLenum shadertype
, GLenum precisiontype
,
180 GLint
*range
, GLint
*precision
);
182 extern void GLAPIENTRY
183 _mesa_ReleaseShaderCompiler(void);
185 extern void GLAPIENTRY
186 _mesa_ShaderBinary(GLint n
, const GLuint
*shaders
, GLenum binaryformat
,
187 const void* binary
, GLint length
);
189 extern void GLAPIENTRY
190 _mesa_GetProgramBinary(GLuint program
, GLsizei bufSize
, GLsizei
*length
,
191 GLenum
*binaryFormat
, GLvoid
*binary
);
193 extern void GLAPIENTRY
194 _mesa_ProgramBinary(GLuint program
, GLenum binaryFormat
,
195 const GLvoid
*binary
, GLsizei length
);
197 extern void GLAPIENTRY
198 _mesa_ProgramParameteri(GLuint program
, GLenum pname
, GLint value
);
201 _mesa_use_shader_program(struct gl_context
*ctx
, GLenum type
,
202 struct gl_shader_program
*shProg
);
204 extern void GLAPIENTRY
205 _mesa_UseShaderProgramEXT(GLenum type
, GLuint program
);
207 extern void GLAPIENTRY
208 _mesa_ActiveProgramEXT(GLuint program
);
210 extern GLuint GLAPIENTRY
211 _mesa_CreateShaderProgramEXT(GLenum type
, const GLchar
*string
);
214 _mesa_copy_linked_program_data(gl_shader_type type
,
215 const struct gl_shader_program
*src
,
216 struct gl_program
*dst
);
223 #endif /* SHADERAPI_H */