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.
34 struct gl_texture_object
;
38 * Is the given FBO a user-created FBO?
40 static inline GLboolean
41 _mesa_is_user_fbo(const struct gl_framebuffer
*fb
)
48 * Is the given FBO a window system FBO (like an X window)?
50 static inline GLboolean
51 _mesa_is_winsys_fbo(const struct gl_framebuffer
*fb
)
59 _mesa_init_fbobjects(struct gl_context
*ctx
);
61 extern struct gl_framebuffer
*
62 _mesa_get_incomplete_framebuffer(void);
64 extern struct gl_renderbuffer
*
65 _mesa_lookup_renderbuffer(struct gl_context
*ctx
, GLuint id
);
67 extern struct gl_renderbuffer
*
68 _mesa_lookup_renderbuffer_err(struct gl_context
*ctx
, GLuint id
,
71 extern struct gl_framebuffer
*
72 _mesa_lookup_framebuffer(struct gl_context
*ctx
, GLuint id
);
74 extern struct gl_framebuffer
*
75 _mesa_lookup_framebuffer_err(struct gl_context
*ctx
, GLuint id
,
80 _mesa_update_texture_renderbuffer(struct gl_context
*ctx
,
81 struct gl_framebuffer
*fb
,
82 struct gl_renderbuffer_attachment
*att
);
85 _mesa_FramebufferRenderbuffer_sw(struct gl_context
*ctx
,
86 struct gl_framebuffer
*fb
,
88 struct gl_renderbuffer
*rb
);
91 _mesa_framebuffer_renderbuffer(struct gl_context
*ctx
,
92 struct gl_framebuffer
*fb
,
94 struct gl_renderbuffer
*rb
);
97 _mesa_renderbuffer_storage(struct gl_context
*ctx
, struct gl_renderbuffer
*rb
,
98 GLenum internalFormat
, GLsizei width
,
99 GLsizei height
, GLsizei samples
);
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(struct gl_context
*ctx
, GLenum internalFormat
);
118 _mesa_detach_renderbuffer(struct gl_context
*ctx
,
119 struct gl_framebuffer
*fb
,
123 _mesa_framebuffer_texture(struct gl_context
*ctx
, struct gl_framebuffer
*fb
,
125 struct gl_texture_object
*texObj
, GLenum textarget
,
126 GLint level
, GLuint layer
, GLboolean layered
,
130 _mesa_check_framebuffer_status(struct gl_context
*ctx
,
131 struct gl_framebuffer
*fb
);
134 _mesa_get_framebuffer_attachment_parameter(struct gl_context
*ctx
,
135 struct gl_framebuffer
*buffer
,
136 GLenum attachment
, GLenum pname
,
137 GLint
*params
, const char *caller
);
141 _mesa_bind_framebuffers(struct gl_context
*ctx
,
142 struct gl_framebuffer
*newDrawFb
,
143 struct gl_framebuffer
*newReadFb
);
145 extern GLboolean GLAPIENTRY
146 _mesa_IsRenderbuffer(GLuint renderbuffer
);
148 extern void GLAPIENTRY
149 _mesa_BindRenderbuffer(GLenum target
, GLuint renderbuffer
);
151 extern void GLAPIENTRY
152 _mesa_BindRenderbufferEXT(GLenum target
, GLuint renderbuffer
);
154 extern void GLAPIENTRY
155 _mesa_DeleteRenderbuffers(GLsizei n
, const GLuint
*renderbuffers
);
157 extern void GLAPIENTRY
158 _mesa_GenRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
160 extern void GLAPIENTRY
161 _mesa_CreateRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
163 extern void GLAPIENTRY
164 _mesa_RenderbufferStorage(GLenum target
, GLenum internalformat
,
165 GLsizei width
, GLsizei height
);
167 extern void GLAPIENTRY
168 _mesa_RenderbufferStorageMultisample(GLenum target
, GLsizei samples
,
169 GLenum internalformat
,
170 GLsizei width
, GLsizei height
);
172 extern void GLAPIENTRY
173 _es_RenderbufferStorageEXT(GLenum target
, GLenum internalFormat
,
174 GLsizei width
, GLsizei height
);
176 extern void GLAPIENTRY
177 _mesa_NamedRenderbufferStorage(GLuint renderbuffer
, GLenum internalformat
,
178 GLsizei width
, GLsizei height
);
180 extern void GLAPIENTRY
181 _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer
, GLsizei samples
,
182 GLenum internalformat
,
183 GLsizei width
, GLsizei height
);
185 extern void GLAPIENTRY
186 _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target
, GLeglImageOES image
);
188 extern void GLAPIENTRY
189 _mesa_GetRenderbufferParameteriv(GLenum target
, GLenum pname
,
193 _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer
, GLenum pname
,
196 extern GLboolean GLAPIENTRY
197 _mesa_IsFramebuffer(GLuint framebuffer
);
199 extern void GLAPIENTRY
200 _mesa_BindFramebuffer(GLenum target
, GLuint framebuffer
);
202 extern void GLAPIENTRY
203 _mesa_BindFramebufferEXT(GLenum target
, GLuint framebuffer
);
205 extern void GLAPIENTRY
206 _mesa_DeleteFramebuffers(GLsizei n
, const GLuint
*framebuffers
);
208 extern void GLAPIENTRY
209 _mesa_GenFramebuffers(GLsizei n
, GLuint
*framebuffers
);
211 extern void GLAPIENTRY
212 _mesa_CreateFramebuffers(GLsizei n
, GLuint
*framebuffers
);
214 extern GLenum GLAPIENTRY
215 _mesa_CheckFramebufferStatus(GLenum target
);
217 extern GLenum GLAPIENTRY
218 _mesa_CheckNamedFramebufferStatus(GLuint framebuffer
, GLenum target
);
220 extern void GLAPIENTRY
221 _mesa_FramebufferTexture1D(GLenum target
, GLenum attachment
,
222 GLenum textarget
, GLuint texture
, GLint level
);
224 extern void GLAPIENTRY
225 _mesa_FramebufferTexture2D(GLenum target
, GLenum attachment
,
226 GLenum textarget
, GLuint texture
, GLint level
);
228 extern void GLAPIENTRY
229 _mesa_FramebufferTexture3D(GLenum target
, GLenum attachment
,
230 GLenum textarget
, GLuint texture
,
231 GLint level
, GLint layer
);
233 extern void GLAPIENTRY
234 _mesa_FramebufferTextureLayer(GLenum target
, GLenum attachment
,
235 GLuint texture
, GLint level
, GLint layer
);
237 extern void GLAPIENTRY
238 _mesa_NamedFramebufferTextureLayer(GLuint framebuffer
, GLenum attachment
,
239 GLuint texture
, GLint level
, GLint layer
);
241 extern void GLAPIENTRY
242 _mesa_FramebufferTexture(GLenum target
, GLenum attachment
,
243 GLuint texture
, GLint level
);
245 extern void GLAPIENTRY
246 _mesa_NamedFramebufferTexture(GLuint framebuffer
, GLenum attachment
,
247 GLuint texture
, GLint level
);
249 extern void GLAPIENTRY
250 _mesa_FramebufferRenderbuffer(GLenum target
, GLenum attachment
,
251 GLenum renderbuffertarget
,
252 GLuint renderbuffer
);
254 extern void GLAPIENTRY
255 _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer
, GLenum attachment
,
256 GLenum renderbuffertarget
,
257 GLuint renderbuffer
);
259 extern void GLAPIENTRY
260 _mesa_GetFramebufferAttachmentParameteriv(GLenum target
, GLenum attachment
,
261 GLenum pname
, GLint
*params
);
262 extern void GLAPIENTRY
263 _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer
,
265 GLenum pname
, GLint
*params
);
267 extern void GLAPIENTRY
268 _mesa_NamedFramebufferParameteri(GLuint framebuffer
, GLenum pname
,
271 extern void GLAPIENTRY
272 _mesa_GetNamedFramebufferParameteriv(GLuint framebuffer
, GLenum pname
,
275 extern void GLAPIENTRY
276 _mesa_InvalidateSubFramebuffer(GLenum target
, GLsizei numAttachments
,
277 const GLenum
*attachments
, GLint x
, GLint y
,
278 GLsizei width
, GLsizei height
);
280 extern void GLAPIENTRY
281 _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer
,
282 GLsizei numAttachments
,
283 const GLenum
*attachments
,
285 GLsizei width
, GLsizei height
);
287 extern void GLAPIENTRY
288 _mesa_InvalidateFramebuffer(GLenum target
, GLsizei numAttachments
,
289 const GLenum
*attachments
);
291 extern void GLAPIENTRY
292 _mesa_InvalidateNamedFramebufferData(GLuint framebuffer
,
293 GLsizei numAttachments
,
294 const GLenum
*attachments
);
296 extern void GLAPIENTRY
297 _mesa_DiscardFramebufferEXT(GLenum target
, GLsizei numAttachments
,
298 const GLenum
*attachments
);
300 extern void GLAPIENTRY
301 _mesa_FramebufferParameteri(GLenum target
, GLenum pname
, GLint param
);
303 extern void GLAPIENTRY
304 _mesa_GetFramebufferParameteriv(GLenum target
, GLenum pname
, GLint
*params
);
306 #endif /* FBOBJECT_H */