2 * Mesa 3-D graphics library
4 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
33 struct gl_texture_object
;
37 * Is the given FBO a user-created FBO?
39 static inline GLboolean
40 _mesa_is_user_fbo(const struct gl_framebuffer
*fb
)
47 * Is the given FBO a window system FBO (like an X window)?
49 static inline GLboolean
50 _mesa_is_winsys_fbo(const struct gl_framebuffer
*fb
)
58 _mesa_init_fbobjects(struct gl_context
*ctx
);
60 extern struct gl_framebuffer
*
61 _mesa_get_incomplete_framebuffer(void);
63 extern struct gl_renderbuffer
*
64 _mesa_lookup_renderbuffer(struct gl_context
*ctx
, GLuint id
);
66 extern struct gl_renderbuffer
*
67 _mesa_lookup_renderbuffer_err(struct gl_context
*ctx
, GLuint id
,
70 extern struct gl_framebuffer
*
71 _mesa_lookup_framebuffer(struct gl_context
*ctx
, GLuint id
);
73 extern struct gl_framebuffer
*
74 _mesa_lookup_framebuffer_err(struct gl_context
*ctx
, GLuint id
,
79 _mesa_update_texture_renderbuffer(struct gl_context
*ctx
,
80 struct gl_framebuffer
*fb
,
81 struct gl_renderbuffer_attachment
*att
);
84 _mesa_FramebufferRenderbuffer_sw(struct gl_context
*ctx
,
85 struct gl_framebuffer
*fb
,
87 struct gl_renderbuffer
*rb
);
90 _mesa_framebuffer_renderbuffer(struct gl_context
*ctx
,
91 struct gl_framebuffer
*fb
,
93 struct gl_renderbuffer
*rb
);
96 _mesa_renderbuffer_storage(struct gl_context
*ctx
, struct gl_renderbuffer
*rb
,
97 GLenum internalFormat
, GLsizei width
,
98 GLsizei height
, GLsizei samples
);
101 _mesa_validate_framebuffer(struct gl_context
*ctx
, struct gl_framebuffer
*fb
);
104 _mesa_has_depthstencil_combined(const struct gl_framebuffer
*fb
);
107 _mesa_test_framebuffer_completeness(struct gl_context
*ctx
,
108 struct gl_framebuffer
*fb
);
111 _mesa_is_legal_color_format(const struct gl_context
*ctx
, GLenum baseFormat
);
114 _mesa_base_fbo_format(const struct gl_context
*ctx
, GLenum internalFormat
);
117 _mesa_detach_renderbuffer(struct gl_context
*ctx
,
118 struct gl_framebuffer
*fb
,
121 extern struct gl_renderbuffer_attachment
*
122 _mesa_get_and_validate_attachment(struct gl_context
*ctx
,
123 struct gl_framebuffer
*fb
,
124 GLenum attachment
, const char *caller
);
127 _mesa_framebuffer_texture(struct gl_context
*ctx
, struct gl_framebuffer
*fb
,
129 struct gl_renderbuffer_attachment
*att
,
130 struct gl_texture_object
*texObj
, GLenum textarget
,
131 GLint level
, GLuint layer
, GLboolean layered
);
134 _mesa_check_framebuffer_status(struct gl_context
*ctx
,
135 struct gl_framebuffer
*fb
);
138 _mesa_bind_framebuffers(struct gl_context
*ctx
,
139 struct gl_framebuffer
*newDrawFb
,
140 struct gl_framebuffer
*newReadFb
);
142 extern GLboolean GLAPIENTRY
143 _mesa_IsRenderbuffer(GLuint renderbuffer
);
145 extern void GLAPIENTRY
146 _mesa_BindRenderbuffer(GLenum target
, GLuint renderbuffer
);
148 extern void GLAPIENTRY
149 _mesa_BindRenderbufferEXT(GLenum target
, GLuint renderbuffer
);
151 extern void GLAPIENTRY
152 _mesa_DeleteRenderbuffers(GLsizei n
, const GLuint
*renderbuffers
);
155 _mesa_GenRenderbuffers_no_error(GLsizei n
, GLuint
*renderbuffers
);
157 extern void GLAPIENTRY
158 _mesa_GenRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
161 _mesa_CreateRenderbuffers_no_error(GLsizei n
, GLuint
*renderbuffers
);
163 extern void GLAPIENTRY
164 _mesa_CreateRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
166 extern void GLAPIENTRY
167 _mesa_RenderbufferStorage(GLenum target
, GLenum internalformat
,
168 GLsizei width
, GLsizei height
);
170 extern void GLAPIENTRY
171 _mesa_RenderbufferStorageMultisample(GLenum target
, GLsizei samples
,
172 GLenum internalformat
,
173 GLsizei width
, GLsizei height
);
175 extern void GLAPIENTRY
176 _es_RenderbufferStorageEXT(GLenum target
, GLenum internalFormat
,
177 GLsizei width
, GLsizei height
);
179 extern void GLAPIENTRY
180 _mesa_NamedRenderbufferStorage(GLuint renderbuffer
, GLenum internalformat
,
181 GLsizei width
, GLsizei height
);
183 extern void GLAPIENTRY
184 _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer
, GLsizei samples
,
185 GLenum internalformat
,
186 GLsizei width
, GLsizei height
);
188 extern void GLAPIENTRY
189 _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target
, GLeglImageOES image
);
191 extern void GLAPIENTRY
192 _mesa_GetRenderbufferParameteriv(GLenum target
, GLenum pname
,
196 _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer
, GLenum pname
,
199 extern GLboolean GLAPIENTRY
200 _mesa_IsFramebuffer(GLuint framebuffer
);
202 extern void GLAPIENTRY
203 _mesa_BindFramebuffer(GLenum target
, GLuint framebuffer
);
205 extern void GLAPIENTRY
206 _mesa_BindFramebufferEXT(GLenum target
, GLuint framebuffer
);
208 extern void GLAPIENTRY
209 _mesa_DeleteFramebuffers(GLsizei n
, const GLuint
*framebuffers
);
211 extern void GLAPIENTRY
212 _mesa_GenFramebuffers(GLsizei n
, GLuint
*framebuffers
);
214 extern void GLAPIENTRY
215 _mesa_CreateFramebuffers(GLsizei n
, GLuint
*framebuffers
);
218 _mesa_CheckFramebufferStatus_no_error(GLenum target
);
220 extern GLenum GLAPIENTRY
221 _mesa_CheckFramebufferStatus(GLenum target
);
223 extern GLenum GLAPIENTRY
224 _mesa_CheckNamedFramebufferStatus(GLuint framebuffer
, GLenum target
);
226 extern void GLAPIENTRY
227 _mesa_FramebufferTexture1D_no_error(GLenum target
, GLenum attachment
,
228 GLenum textarget
, GLuint texture
,
230 extern void GLAPIENTRY
231 _mesa_FramebufferTexture1D(GLenum target
, GLenum attachment
,
232 GLenum textarget
, GLuint texture
, GLint level
);
234 extern void GLAPIENTRY
235 _mesa_FramebufferTexture2D_no_error(GLenum target
, GLenum attachment
,
236 GLenum textarget
, GLuint texture
,
238 extern void GLAPIENTRY
239 _mesa_FramebufferTexture2D(GLenum target
, GLenum attachment
,
240 GLenum textarget
, GLuint texture
, GLint level
);
242 extern void GLAPIENTRY
243 _mesa_FramebufferTexture3D_no_error(GLenum target
, GLenum attachment
,
244 GLenum textarget
, GLuint texture
,
245 GLint level
, GLint layer
);
246 extern void GLAPIENTRY
247 _mesa_FramebufferTexture3D(GLenum target
, GLenum attachment
,
248 GLenum textarget
, GLuint texture
,
249 GLint level
, GLint layer
);
251 extern void GLAPIENTRY
252 _mesa_FramebufferTextureLayer_no_error(GLenum target
, GLenum attachment
,
253 GLuint texture
, GLint level
,
255 extern void GLAPIENTRY
256 _mesa_FramebufferTextureLayer(GLenum target
, GLenum attachment
,
257 GLuint texture
, GLint level
, GLint layer
);
259 extern void GLAPIENTRY
260 _mesa_NamedFramebufferTextureLayer_no_error(GLuint framebuffer
,
262 GLuint texture
, GLint level
,
264 extern void GLAPIENTRY
265 _mesa_NamedFramebufferTextureLayer(GLuint framebuffer
, GLenum attachment
,
266 GLuint texture
, GLint level
, GLint layer
);
268 extern void GLAPIENTRY
269 _mesa_FramebufferTexture_no_error(GLenum target
, GLenum attachment
,
270 GLuint texture
, GLint level
);
271 extern void GLAPIENTRY
272 _mesa_FramebufferTexture(GLenum target
, GLenum attachment
,
273 GLuint texture
, GLint level
);
275 extern void GLAPIENTRY
276 _mesa_NamedFramebufferTexture_no_error(GLuint framebuffer
, GLenum attachment
,
277 GLuint texture
, GLint level
);
278 extern void GLAPIENTRY
279 _mesa_NamedFramebufferTexture(GLuint framebuffer
, GLenum attachment
,
280 GLuint texture
, GLint level
);
283 _mesa_FramebufferRenderbuffer_no_error(GLenum target
, GLenum attachment
,
284 GLenum renderbuffertarget
,
285 GLuint renderbuffer
);
287 extern void GLAPIENTRY
288 _mesa_FramebufferRenderbuffer(GLenum target
, GLenum attachment
,
289 GLenum renderbuffertarget
,
290 GLuint renderbuffer
);
293 _mesa_NamedFramebufferRenderbuffer_no_error(GLuint framebuffer
,
295 GLenum renderbuffertarget
,
296 GLuint renderbuffer
);
298 extern void GLAPIENTRY
299 _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer
, GLenum attachment
,
300 GLenum renderbuffertarget
,
301 GLuint renderbuffer
);
303 extern void GLAPIENTRY
304 _mesa_GetFramebufferAttachmentParameteriv(GLenum target
, GLenum attachment
,
305 GLenum pname
, GLint
*params
);
306 extern void GLAPIENTRY
307 _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer
,
309 GLenum pname
, GLint
*params
);
311 extern void GLAPIENTRY
312 _mesa_NamedFramebufferParameteri(GLuint framebuffer
, GLenum pname
,
315 extern void GLAPIENTRY
316 _mesa_GetNamedFramebufferParameteriv(GLuint framebuffer
, GLenum pname
,
320 _mesa_InvalidateSubFramebuffer_no_error(GLenum target
, GLsizei numAttachments
,
321 const GLenum
*attachments
, GLint x
,
322 GLint y
, GLsizei width
, GLsizei height
);
324 extern void GLAPIENTRY
325 _mesa_InvalidateSubFramebuffer(GLenum target
, GLsizei numAttachments
,
326 const GLenum
*attachments
, GLint x
, GLint y
,
327 GLsizei width
, GLsizei height
);
329 extern void GLAPIENTRY
330 _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer
,
331 GLsizei numAttachments
,
332 const GLenum
*attachments
,
334 GLsizei width
, GLsizei height
);
336 _mesa_InvalidateFramebuffer_no_error(GLenum target
, GLsizei numAttachments
,
337 const GLenum
*attachments
);
339 extern void GLAPIENTRY
340 _mesa_InvalidateFramebuffer(GLenum target
, GLsizei numAttachments
,
341 const GLenum
*attachments
);
343 extern void GLAPIENTRY
344 _mesa_InvalidateNamedFramebufferData(GLuint framebuffer
,
345 GLsizei numAttachments
,
346 const GLenum
*attachments
);
348 extern void GLAPIENTRY
349 _mesa_DiscardFramebufferEXT(GLenum target
, GLsizei numAttachments
,
350 const GLenum
*attachments
);
352 extern void GLAPIENTRY
353 _mesa_FramebufferParameteri(GLenum target
, GLenum pname
, GLint param
);
355 extern void GLAPIENTRY
356 _mesa_GetFramebufferParameteriv(GLenum target
, GLenum pname
, GLint
*params
);
358 extern void GLAPIENTRY
359 _mesa_FramebufferSampleLocationsfvARB(GLenum target
, GLuint start
,
360 GLsizei count
, const GLfloat
*v
);
362 extern void GLAPIENTRY
363 _mesa_NamedFramebufferSampleLocationsfvARB(GLuint framebuffer
, GLuint start
,
364 GLsizei count
, const GLfloat
*v
);
366 extern void GLAPIENTRY
367 _mesa_FramebufferSampleLocationsfvARB_no_error(GLenum target
, GLuint start
,
368 GLsizei count
, const GLfloat
*v
);
370 extern void GLAPIENTRY
371 _mesa_NamedFramebufferSampleLocationsfvARB_no_error(GLuint framebuffer
,
372 GLuint start
, GLsizei count
,
375 extern void GLAPIENTRY
376 _mesa_EvaluateDepthValuesARB(void);
378 #endif /* FBOBJECT_H */