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
,
99 GLsizei storageSamples
);
102 _mesa_validate_framebuffer(struct gl_context
*ctx
, struct gl_framebuffer
*fb
);
105 _mesa_has_depthstencil_combined(const struct gl_framebuffer
*fb
);
108 _mesa_test_framebuffer_completeness(struct gl_context
*ctx
,
109 struct gl_framebuffer
*fb
);
112 _mesa_is_legal_color_format(const struct gl_context
*ctx
, GLenum baseFormat
);
115 _mesa_base_fbo_format(const struct gl_context
*ctx
, GLenum internalFormat
);
118 _mesa_detach_renderbuffer(struct gl_context
*ctx
,
119 struct gl_framebuffer
*fb
,
122 extern struct gl_renderbuffer_attachment
*
123 _mesa_get_and_validate_attachment(struct gl_context
*ctx
,
124 struct gl_framebuffer
*fb
,
125 GLenum attachment
, const char *caller
);
128 _mesa_framebuffer_texture(struct gl_context
*ctx
, struct gl_framebuffer
*fb
,
130 struct gl_renderbuffer_attachment
*att
,
131 struct gl_texture_object
*texObj
, GLenum textarget
,
132 GLint level
, GLuint layer
, GLboolean layered
);
135 _mesa_check_framebuffer_status(struct gl_context
*ctx
,
136 struct gl_framebuffer
*fb
);
139 _mesa_bind_framebuffers(struct gl_context
*ctx
,
140 struct gl_framebuffer
*newDrawFb
,
141 struct gl_framebuffer
*newReadFb
);
143 extern GLboolean GLAPIENTRY
144 _mesa_IsRenderbuffer(GLuint renderbuffer
);
146 extern void GLAPIENTRY
147 _mesa_BindRenderbuffer(GLenum target
, GLuint renderbuffer
);
149 extern void GLAPIENTRY
150 _mesa_BindRenderbufferEXT(GLenum target
, GLuint renderbuffer
);
152 extern void GLAPIENTRY
153 _mesa_DeleteRenderbuffers(GLsizei n
, const GLuint
*renderbuffers
);
156 _mesa_GenRenderbuffers_no_error(GLsizei n
, GLuint
*renderbuffers
);
158 extern void GLAPIENTRY
159 _mesa_GenRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
162 _mesa_CreateRenderbuffers_no_error(GLsizei n
, GLuint
*renderbuffers
);
164 extern void GLAPIENTRY
165 _mesa_CreateRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
167 extern void GLAPIENTRY
168 _mesa_RenderbufferStorage(GLenum target
, GLenum internalformat
,
169 GLsizei width
, GLsizei height
);
171 extern void GLAPIENTRY
172 _mesa_RenderbufferStorageMultisample(GLenum target
, GLsizei samples
,
173 GLenum internalformat
,
174 GLsizei width
, GLsizei height
);
176 extern void GLAPIENTRY
177 _mesa_RenderbufferStorageMultisampleAdvancedAMD(
178 GLenum target
, GLsizei samples
, GLsizei storageSamples
,
179 GLenum internalFormat
, GLsizei width
, GLsizei height
);
181 extern void GLAPIENTRY
182 _es_RenderbufferStorageEXT(GLenum target
, GLenum internalFormat
,
183 GLsizei width
, GLsizei height
);
185 extern void GLAPIENTRY
186 _mesa_NamedRenderbufferStorage(GLuint renderbuffer
, GLenum internalformat
,
187 GLsizei width
, GLsizei height
);
189 extern void GLAPIENTRY
190 _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer
, GLsizei samples
,
191 GLenum internalformat
,
192 GLsizei width
, GLsizei height
);
194 extern void GLAPIENTRY
195 _mesa_NamedRenderbufferStorageMultisampleAdvancedAMD(
196 GLuint renderbuffer
, GLsizei samples
, GLsizei storageSamples
,
197 GLenum internalformat
, GLsizei width
, GLsizei height
);
199 extern void GLAPIENTRY
200 _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target
, GLeglImageOES image
);
202 extern void GLAPIENTRY
203 _mesa_GetRenderbufferParameteriv(GLenum target
, GLenum pname
,
207 _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer
, GLenum pname
,
210 extern GLboolean GLAPIENTRY
211 _mesa_IsFramebuffer(GLuint framebuffer
);
213 extern void GLAPIENTRY
214 _mesa_BindFramebuffer(GLenum target
, GLuint framebuffer
);
216 extern void GLAPIENTRY
217 _mesa_BindFramebufferEXT(GLenum target
, GLuint framebuffer
);
219 extern void GLAPIENTRY
220 _mesa_DeleteFramebuffers(GLsizei n
, const GLuint
*framebuffers
);
222 extern void GLAPIENTRY
223 _mesa_GenFramebuffers(GLsizei n
, GLuint
*framebuffers
);
225 extern void GLAPIENTRY
226 _mesa_CreateFramebuffers(GLsizei n
, GLuint
*framebuffers
);
229 _mesa_CheckFramebufferStatus_no_error(GLenum target
);
231 extern GLenum GLAPIENTRY
232 _mesa_CheckFramebufferStatus(GLenum target
);
234 extern GLenum GLAPIENTRY
235 _mesa_CheckNamedFramebufferStatus(GLuint framebuffer
, GLenum target
);
237 extern void GLAPIENTRY
238 _mesa_FramebufferTexture1D_no_error(GLenum target
, GLenum attachment
,
239 GLenum textarget
, GLuint texture
,
241 extern void GLAPIENTRY
242 _mesa_FramebufferTexture1D(GLenum target
, GLenum attachment
,
243 GLenum textarget
, GLuint texture
, GLint level
);
245 extern void GLAPIENTRY
246 _mesa_FramebufferTexture2D_no_error(GLenum target
, GLenum attachment
,
247 GLenum textarget
, GLuint texture
,
249 extern void GLAPIENTRY
250 _mesa_FramebufferTexture2D(GLenum target
, GLenum attachment
,
251 GLenum textarget
, GLuint texture
, GLint level
);
253 extern void GLAPIENTRY
254 _mesa_FramebufferTexture3D_no_error(GLenum target
, GLenum attachment
,
255 GLenum textarget
, GLuint texture
,
256 GLint level
, GLint layer
);
257 extern void GLAPIENTRY
258 _mesa_FramebufferTexture3D(GLenum target
, GLenum attachment
,
259 GLenum textarget
, GLuint texture
,
260 GLint level
, GLint layer
);
262 extern void GLAPIENTRY
263 _mesa_FramebufferTextureLayer_no_error(GLenum target
, GLenum attachment
,
264 GLuint texture
, GLint level
,
266 extern void GLAPIENTRY
267 _mesa_FramebufferTextureLayer(GLenum target
, GLenum attachment
,
268 GLuint texture
, GLint level
, GLint layer
);
270 extern void GLAPIENTRY
271 _mesa_NamedFramebufferTextureLayer_no_error(GLuint framebuffer
,
273 GLuint texture
, GLint level
,
275 extern void GLAPIENTRY
276 _mesa_NamedFramebufferTextureLayer(GLuint framebuffer
, GLenum attachment
,
277 GLuint texture
, GLint level
, GLint layer
);
279 extern void GLAPIENTRY
280 _mesa_FramebufferTexture_no_error(GLenum target
, GLenum attachment
,
281 GLuint texture
, GLint level
);
282 extern void GLAPIENTRY
283 _mesa_FramebufferTexture(GLenum target
, GLenum attachment
,
284 GLuint texture
, GLint level
);
286 extern void GLAPIENTRY
287 _mesa_NamedFramebufferTexture_no_error(GLuint framebuffer
, GLenum attachment
,
288 GLuint texture
, GLint level
);
289 extern void GLAPIENTRY
290 _mesa_NamedFramebufferTexture(GLuint framebuffer
, GLenum attachment
,
291 GLuint texture
, GLint level
);
294 _mesa_FramebufferRenderbuffer_no_error(GLenum target
, GLenum attachment
,
295 GLenum renderbuffertarget
,
296 GLuint renderbuffer
);
298 extern void GLAPIENTRY
299 _mesa_FramebufferRenderbuffer(GLenum target
, GLenum attachment
,
300 GLenum renderbuffertarget
,
301 GLuint renderbuffer
);
304 _mesa_NamedFramebufferRenderbuffer_no_error(GLuint framebuffer
,
306 GLenum renderbuffertarget
,
307 GLuint renderbuffer
);
309 extern void GLAPIENTRY
310 _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer
, GLenum attachment
,
311 GLenum renderbuffertarget
,
312 GLuint renderbuffer
);
314 extern void GLAPIENTRY
315 _mesa_GetFramebufferAttachmentParameteriv(GLenum target
, GLenum attachment
,
316 GLenum pname
, GLint
*params
);
317 extern void GLAPIENTRY
318 _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer
,
320 GLenum pname
, GLint
*params
);
322 extern void GLAPIENTRY
323 _mesa_NamedFramebufferParameteri(GLuint framebuffer
, GLenum pname
,
326 extern void GLAPIENTRY
327 _mesa_GetNamedFramebufferParameteriv(GLuint framebuffer
, GLenum pname
,
331 _mesa_InvalidateSubFramebuffer_no_error(GLenum target
, GLsizei numAttachments
,
332 const GLenum
*attachments
, GLint x
,
333 GLint y
, GLsizei width
, GLsizei height
);
335 extern void GLAPIENTRY
336 _mesa_InvalidateSubFramebuffer(GLenum target
, GLsizei numAttachments
,
337 const GLenum
*attachments
, GLint x
, GLint y
,
338 GLsizei width
, GLsizei height
);
340 extern void GLAPIENTRY
341 _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer
,
342 GLsizei numAttachments
,
343 const GLenum
*attachments
,
345 GLsizei width
, GLsizei height
);
347 _mesa_InvalidateFramebuffer_no_error(GLenum target
, GLsizei numAttachments
,
348 const GLenum
*attachments
);
350 extern void GLAPIENTRY
351 _mesa_InvalidateFramebuffer(GLenum target
, GLsizei numAttachments
,
352 const GLenum
*attachments
);
354 extern void GLAPIENTRY
355 _mesa_InvalidateNamedFramebufferData(GLuint framebuffer
,
356 GLsizei numAttachments
,
357 const GLenum
*attachments
);
359 extern void GLAPIENTRY
360 _mesa_DiscardFramebufferEXT(GLenum target
, GLsizei numAttachments
,
361 const GLenum
*attachments
);
363 extern void GLAPIENTRY
364 _mesa_FramebufferParameteri(GLenum target
, GLenum pname
, GLint param
);
366 extern void GLAPIENTRY
367 _mesa_GetFramebufferParameteriv(GLenum target
, GLenum pname
, GLint
*params
);
369 extern void GLAPIENTRY
370 _mesa_FramebufferSampleLocationsfvARB(GLenum target
, GLuint start
,
371 GLsizei count
, const GLfloat
*v
);
373 extern void GLAPIENTRY
374 _mesa_NamedFramebufferSampleLocationsfvARB(GLuint framebuffer
, GLuint start
,
375 GLsizei count
, const GLfloat
*v
);
377 extern void GLAPIENTRY
378 _mesa_FramebufferSampleLocationsfvARB_no_error(GLenum target
, GLuint start
,
379 GLsizei count
, const GLfloat
*v
);
381 extern void GLAPIENTRY
382 _mesa_NamedFramebufferSampleLocationsfvARB_no_error(GLuint framebuffer
,
383 GLuint start
, GLsizei count
,
386 extern void GLAPIENTRY
387 _mesa_EvaluateDepthValuesARB(void);
389 #endif /* FBOBJECT_H */