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
, GLsizei samples
,
133 GLuint layer
, GLboolean layered
);
136 _mesa_check_framebuffer_status(struct gl_context
*ctx
,
137 struct gl_framebuffer
*fb
);
140 _mesa_bind_framebuffers(struct gl_context
*ctx
,
141 struct gl_framebuffer
*newDrawFb
,
142 struct gl_framebuffer
*newReadFb
);
144 extern GLboolean GLAPIENTRY
145 _mesa_IsRenderbuffer(GLuint renderbuffer
);
147 extern void GLAPIENTRY
148 _mesa_BindRenderbuffer(GLenum target
, GLuint renderbuffer
);
150 extern void GLAPIENTRY
151 _mesa_BindRenderbufferEXT(GLenum target
, GLuint renderbuffer
);
153 extern void GLAPIENTRY
154 _mesa_DeleteRenderbuffers(GLsizei n
, const GLuint
*renderbuffers
);
157 _mesa_GenRenderbuffers_no_error(GLsizei n
, GLuint
*renderbuffers
);
159 extern void GLAPIENTRY
160 _mesa_GenRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
163 _mesa_CreateRenderbuffers_no_error(GLsizei n
, GLuint
*renderbuffers
);
165 extern void GLAPIENTRY
166 _mesa_CreateRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
168 extern void GLAPIENTRY
169 _mesa_RenderbufferStorage(GLenum target
, GLenum internalformat
,
170 GLsizei width
, GLsizei height
);
172 extern void GLAPIENTRY
173 _mesa_RenderbufferStorageMultisample(GLenum target
, GLsizei samples
,
174 GLenum internalformat
,
175 GLsizei width
, GLsizei height
);
177 extern void GLAPIENTRY
178 _mesa_RenderbufferStorageMultisampleAdvancedAMD(
179 GLenum target
, GLsizei samples
, GLsizei storageSamples
,
180 GLenum internalFormat
, GLsizei width
, GLsizei height
);
182 extern void GLAPIENTRY
183 _es_RenderbufferStorageEXT(GLenum target
, GLenum internalFormat
,
184 GLsizei width
, GLsizei height
);
186 extern void GLAPIENTRY
187 _mesa_NamedRenderbufferStorage(GLuint renderbuffer
, GLenum internalformat
,
188 GLsizei width
, GLsizei height
);
190 extern void GLAPIENTRY
191 _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer
, GLsizei samples
,
192 GLenum internalformat
,
193 GLsizei width
, GLsizei height
);
195 extern void GLAPIENTRY
196 _mesa_NamedRenderbufferStorageMultisampleAdvancedAMD(
197 GLuint renderbuffer
, GLsizei samples
, GLsizei storageSamples
,
198 GLenum internalformat
, GLsizei width
, GLsizei height
);
200 extern void GLAPIENTRY
201 _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target
, GLeglImageOES image
);
203 extern void GLAPIENTRY
204 _mesa_GetRenderbufferParameteriv(GLenum target
, GLenum pname
,
208 _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer
, GLenum pname
,
211 extern GLboolean GLAPIENTRY
212 _mesa_IsFramebuffer(GLuint framebuffer
);
214 extern void GLAPIENTRY
215 _mesa_BindFramebuffer(GLenum target
, GLuint framebuffer
);
217 extern void GLAPIENTRY
218 _mesa_BindFramebufferEXT(GLenum target
, GLuint framebuffer
);
220 extern void GLAPIENTRY
221 _mesa_DeleteFramebuffers(GLsizei n
, const GLuint
*framebuffers
);
223 extern void GLAPIENTRY
224 _mesa_GenFramebuffers(GLsizei n
, GLuint
*framebuffers
);
226 extern void GLAPIENTRY
227 _mesa_CreateFramebuffers(GLsizei n
, GLuint
*framebuffers
);
230 _mesa_CheckFramebufferStatus_no_error(GLenum target
);
232 extern GLenum GLAPIENTRY
233 _mesa_CheckFramebufferStatus(GLenum target
);
235 extern GLenum GLAPIENTRY
236 _mesa_CheckNamedFramebufferStatus(GLuint framebuffer
, GLenum target
);
238 extern void GLAPIENTRY
239 _mesa_FramebufferTexture1D_no_error(GLenum target
, GLenum attachment
,
240 GLenum textarget
, GLuint texture
,
242 extern void GLAPIENTRY
243 _mesa_FramebufferTexture1D(GLenum target
, GLenum attachment
,
244 GLenum textarget
, GLuint texture
, GLint level
);
246 extern void GLAPIENTRY
247 _mesa_FramebufferTexture2D_no_error(GLenum target
, GLenum attachment
,
248 GLenum textarget
, GLuint texture
,
250 extern void GLAPIENTRY
251 _mesa_FramebufferTexture2D(GLenum target
, GLenum attachment
,
252 GLenum textarget
, GLuint texture
, GLint level
);
255 _mesa_FramebufferTexture2DMultisampleEXT(GLenum target
, GLenum attachment
,
256 GLenum textarget
, GLuint texture
,
257 GLint level
, GLsizei samples
);
259 extern void GLAPIENTRY
260 _mesa_FramebufferTexture3D_no_error(GLenum target
, GLenum attachment
,
261 GLenum textarget
, GLuint texture
,
262 GLint level
, GLint layer
);
263 extern void GLAPIENTRY
264 _mesa_FramebufferTexture3D(GLenum target
, GLenum attachment
,
265 GLenum textarget
, GLuint texture
,
266 GLint level
, GLint layer
);
268 extern void GLAPIENTRY
269 _mesa_FramebufferTextureLayer_no_error(GLenum target
, GLenum attachment
,
270 GLuint texture
, GLint level
,
272 extern void GLAPIENTRY
273 _mesa_FramebufferTextureLayer(GLenum target
, GLenum attachment
,
274 GLuint texture
, GLint level
, GLint layer
);
276 extern void GLAPIENTRY
277 _mesa_NamedFramebufferTextureLayer_no_error(GLuint framebuffer
,
279 GLuint texture
, GLint level
,
281 extern void GLAPIENTRY
282 _mesa_NamedFramebufferTextureLayer(GLuint framebuffer
, GLenum attachment
,
283 GLuint texture
, GLint level
, GLint layer
);
285 extern void GLAPIENTRY
286 _mesa_FramebufferTexture_no_error(GLenum target
, GLenum attachment
,
287 GLuint texture
, GLint level
);
288 extern void GLAPIENTRY
289 _mesa_FramebufferTexture(GLenum target
, GLenum attachment
,
290 GLuint texture
, GLint level
);
292 extern void GLAPIENTRY
293 _mesa_NamedFramebufferTexture_no_error(GLuint framebuffer
, GLenum attachment
,
294 GLuint texture
, GLint level
);
295 extern void GLAPIENTRY
296 _mesa_NamedFramebufferTexture(GLuint framebuffer
, GLenum attachment
,
297 GLuint texture
, GLint level
);
300 _mesa_FramebufferRenderbuffer_no_error(GLenum target
, GLenum attachment
,
301 GLenum renderbuffertarget
,
302 GLuint renderbuffer
);
304 extern void GLAPIENTRY
305 _mesa_FramebufferRenderbuffer(GLenum target
, GLenum attachment
,
306 GLenum renderbuffertarget
,
307 GLuint renderbuffer
);
310 _mesa_NamedFramebufferRenderbuffer_no_error(GLuint framebuffer
,
312 GLenum renderbuffertarget
,
313 GLuint renderbuffer
);
315 extern void GLAPIENTRY
316 _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer
, GLenum attachment
,
317 GLenum renderbuffertarget
,
318 GLuint renderbuffer
);
320 extern void GLAPIENTRY
321 _mesa_GetFramebufferAttachmentParameteriv(GLenum target
, GLenum attachment
,
322 GLenum pname
, GLint
*params
);
323 extern void GLAPIENTRY
324 _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer
,
326 GLenum pname
, GLint
*params
);
328 extern void GLAPIENTRY
329 _mesa_NamedFramebufferParameteri(GLuint framebuffer
, GLenum pname
,
332 extern void GLAPIENTRY
333 _mesa_GetNamedFramebufferParameteriv(GLuint framebuffer
, GLenum pname
,
337 _mesa_InvalidateSubFramebuffer_no_error(GLenum target
, GLsizei numAttachments
,
338 const GLenum
*attachments
, GLint x
,
339 GLint y
, GLsizei width
, GLsizei height
);
341 extern void GLAPIENTRY
342 _mesa_InvalidateSubFramebuffer(GLenum target
, GLsizei numAttachments
,
343 const GLenum
*attachments
, GLint x
, GLint y
,
344 GLsizei width
, GLsizei height
);
346 extern void GLAPIENTRY
347 _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer
,
348 GLsizei numAttachments
,
349 const GLenum
*attachments
,
351 GLsizei width
, GLsizei height
);
353 _mesa_InvalidateFramebuffer_no_error(GLenum target
, GLsizei numAttachments
,
354 const GLenum
*attachments
);
356 extern void GLAPIENTRY
357 _mesa_InvalidateFramebuffer(GLenum target
, GLsizei numAttachments
,
358 const GLenum
*attachments
);
360 extern void GLAPIENTRY
361 _mesa_InvalidateNamedFramebufferData(GLuint framebuffer
,
362 GLsizei numAttachments
,
363 const GLenum
*attachments
);
365 extern void GLAPIENTRY
366 _mesa_DiscardFramebufferEXT(GLenum target
, GLsizei numAttachments
,
367 const GLenum
*attachments
);
369 extern void GLAPIENTRY
370 _mesa_FramebufferParameteri(GLenum target
, GLenum pname
, GLint param
);
372 extern void GLAPIENTRY
373 _mesa_GetFramebufferParameteriv(GLenum target
, GLenum pname
, GLint
*params
);
375 extern void GLAPIENTRY
376 _mesa_FramebufferSampleLocationsfvARB(GLenum target
, GLuint start
,
377 GLsizei count
, const GLfloat
*v
);
379 extern void GLAPIENTRY
380 _mesa_NamedFramebufferSampleLocationsfvARB(GLuint framebuffer
, GLuint start
,
381 GLsizei count
, const GLfloat
*v
);
383 extern void GLAPIENTRY
384 _mesa_FramebufferSampleLocationsfvARB_no_error(GLenum target
, GLuint start
,
385 GLsizei count
, const GLfloat
*v
);
387 extern void GLAPIENTRY
388 _mesa_NamedFramebufferSampleLocationsfvARB_no_error(GLuint framebuffer
,
389 GLuint start
, GLsizei count
,
392 extern void GLAPIENTRY
393 _mesa_EvaluateDepthValuesARB(void);
395 #endif /* FBOBJECT_H */