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_framebuffer
*
68 _mesa_lookup_framebuffer(struct gl_context
*ctx
, GLuint id
);
70 extern struct gl_renderbuffer_attachment
*
71 _mesa_get_attachment(struct gl_context
*ctx
, struct gl_framebuffer
*fb
,
75 _mesa_remove_attachment(struct gl_context
*ctx
,
76 struct gl_renderbuffer_attachment
*att
);
79 _mesa_set_texture_attachment(struct gl_context
*ctx
,
80 struct gl_framebuffer
*fb
,
81 struct gl_renderbuffer_attachment
*att
,
82 struct gl_texture_object
*texObj
,
83 GLenum texTarget
, GLuint level
, GLuint zoffset
,
87 _mesa_set_renderbuffer_attachment(struct gl_context
*ctx
,
88 struct gl_renderbuffer_attachment
*att
,
89 struct gl_renderbuffer
*rb
);
92 _mesa_update_texture_renderbuffer(struct gl_context
*ctx
,
93 struct gl_framebuffer
*fb
,
94 struct gl_renderbuffer_attachment
*att
);
97 _mesa_framebuffer_renderbuffer(struct gl_context
*ctx
,
98 struct gl_framebuffer
*fb
,
99 GLenum attachment
, struct gl_renderbuffer
*rb
);
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
,
122 extern GLboolean GLAPIENTRY
123 _mesa_IsRenderbuffer(GLuint renderbuffer
);
125 extern void GLAPIENTRY
126 _mesa_BindRenderbuffer(GLenum target
, GLuint renderbuffer
);
128 extern void GLAPIENTRY
129 _mesa_BindRenderbufferEXT(GLenum target
, GLuint renderbuffer
);
131 extern void GLAPIENTRY
132 _mesa_DeleteRenderbuffers(GLsizei n
, const GLuint
*renderbuffers
);
134 extern void GLAPIENTRY
135 _mesa_GenRenderbuffers(GLsizei n
, GLuint
*renderbuffers
);
137 extern void GLAPIENTRY
138 _mesa_RenderbufferStorage(GLenum target
, GLenum internalformat
,
139 GLsizei width
, GLsizei height
);
141 extern void GLAPIENTRY
142 _mesa_RenderbufferStorageMultisample(GLenum target
, GLsizei samples
,
143 GLenum internalformat
,
144 GLsizei width
, GLsizei height
);
146 extern void GLAPIENTRY
147 _es_RenderbufferStorageEXT(GLenum target
, GLenum internalFormat
,
148 GLsizei width
, GLsizei height
);
150 extern void GLAPIENTRY
151 _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target
, GLeglImageOES image
);
153 extern void GLAPIENTRY
154 _mesa_GetRenderbufferParameteriv(GLenum target
, GLenum pname
,
157 extern GLboolean GLAPIENTRY
158 _mesa_IsFramebuffer(GLuint framebuffer
);
160 extern void GLAPIENTRY
161 _mesa_BindFramebuffer(GLenum target
, GLuint framebuffer
);
163 extern void GLAPIENTRY
164 _mesa_BindFramebufferEXT(GLenum target
, GLuint framebuffer
);
166 extern void GLAPIENTRY
167 _mesa_DeleteFramebuffers(GLsizei n
, const GLuint
*framebuffers
);
169 extern void GLAPIENTRY
170 _mesa_GenFramebuffers(GLsizei n
, GLuint
*framebuffers
);
172 extern GLenum GLAPIENTRY
173 _mesa_CheckFramebufferStatus(GLenum target
);
175 extern void GLAPIENTRY
176 _mesa_FramebufferTexture1D(GLenum target
, GLenum attachment
,
177 GLenum textarget
, GLuint texture
, GLint level
);
179 extern void GLAPIENTRY
180 _mesa_FramebufferTexture2D(GLenum target
, GLenum attachment
,
181 GLenum textarget
, GLuint texture
, GLint level
);
183 extern void GLAPIENTRY
184 _mesa_FramebufferTexture3D(GLenum target
, GLenum attachment
,
185 GLenum textarget
, GLuint texture
,
186 GLint level
, GLint zoffset
);
188 extern void GLAPIENTRY
189 _mesa_FramebufferTextureLayer(GLenum target
, GLenum attachment
,
190 GLuint texture
, GLint level
, GLint layer
);
192 extern void GLAPIENTRY
193 _mesa_FramebufferTexture(GLenum target
, GLenum attachment
,
194 GLuint texture
, GLint level
);
196 extern void GLAPIENTRY
197 _mesa_FramebufferRenderbuffer(GLenum target
, GLenum attachment
,
198 GLenum renderbuffertarget
,
199 GLuint renderbuffer
);
201 extern void GLAPIENTRY
202 _mesa_GetFramebufferAttachmentParameteriv(GLenum target
, GLenum attachment
,
203 GLenum pname
, GLint
*params
);
205 extern void GLAPIENTRY
206 _mesa_GenerateMipmap(GLenum target
);
209 extern void GLAPIENTRY
210 _mesa_InvalidateSubFramebuffer(GLenum target
, GLsizei numAttachments
,
211 const GLenum
*attachments
, GLint x
, GLint y
,
212 GLsizei width
, GLsizei height
);
214 extern void GLAPIENTRY
215 _mesa_InvalidateFramebuffer(GLenum target
, GLsizei numAttachments
,
216 const GLenum
*attachments
);
218 extern void GLAPIENTRY
219 _mesa_DiscardFramebufferEXT(GLenum target
, GLsizei numAttachments
,
220 const GLenum
*attachments
);
222 #endif /* FBOBJECT_H */