2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 struct gl_texture_object
;
36 _mesa_init_fbobjects(struct gl_context
*ctx
);
38 extern struct gl_framebuffer
*
39 _mesa_get_incomplete_framebuffer(void);
41 extern struct gl_renderbuffer
*
42 _mesa_lookup_renderbuffer(struct gl_context
*ctx
, GLuint id
);
44 extern struct gl_framebuffer
*
45 _mesa_lookup_framebuffer(struct gl_context
*ctx
, GLuint id
);
47 extern struct gl_renderbuffer_attachment
*
48 _mesa_get_attachment(struct gl_context
*ctx
, struct gl_framebuffer
*fb
,
52 /** Return the texture image for a renderbuffer attachment */
53 static inline struct gl_texture_image
*
54 _mesa_get_attachment_teximage(struct gl_renderbuffer_attachment
*att
)
56 assert(att
->Type
== GL_TEXTURE
);
57 return att
->Texture
->Image
[att
->CubeMapFace
][att
->TextureLevel
];
61 /** Return the (const) texture image for a renderbuffer attachment */
62 static inline const struct gl_texture_image
*
63 _mesa_get_attachment_teximage_const(const struct gl_renderbuffer_attachment
*att
)
65 assert(att
->Type
== GL_TEXTURE
);
66 return att
->Texture
->Image
[att
->CubeMapFace
][att
->TextureLevel
];
71 _mesa_remove_attachment(struct gl_context
*ctx
,
72 struct gl_renderbuffer_attachment
*att
);
75 _mesa_set_texture_attachment(struct gl_context
*ctx
,
76 struct gl_framebuffer
*fb
,
77 struct gl_renderbuffer_attachment
*att
,
78 struct gl_texture_object
*texObj
,
79 GLenum texTarget
, GLuint level
, GLuint zoffset
);
82 _mesa_set_renderbuffer_attachment(struct gl_context
*ctx
,
83 struct gl_renderbuffer_attachment
*att
,
84 struct gl_renderbuffer
*rb
);
87 _mesa_framebuffer_renderbuffer(struct gl_context
*ctx
,
88 struct gl_framebuffer
*fb
,
89 GLenum attachment
, struct gl_renderbuffer
*rb
);
92 _mesa_validate_framebuffer(struct gl_context
*ctx
, struct gl_framebuffer
*fb
);
95 _mesa_test_framebuffer_completeness(struct gl_context
*ctx
,
96 struct gl_framebuffer
*fb
);
99 _mesa_is_legal_color_format(const struct gl_context
*ctx
, GLenum baseFormat
);
102 _mesa_base_fbo_format(struct gl_context
*ctx
, GLenum internalFormat
);
104 extern GLboolean GLAPIENTRY
105 _mesa_IsRenderbufferEXT(GLuint renderbuffer
);
107 extern void GLAPIENTRY
108 _mesa_BindRenderbufferEXT(GLenum target
, GLuint renderbuffer
);
110 extern void GLAPIENTRY
111 _mesa_DeleteRenderbuffersEXT(GLsizei n
, const GLuint
*renderbuffers
);
113 extern void GLAPIENTRY
114 _mesa_GenRenderbuffersEXT(GLsizei n
, GLuint
*renderbuffers
);
116 extern void GLAPIENTRY
117 _mesa_RenderbufferStorageEXT(GLenum target
, GLenum internalformat
,
118 GLsizei width
, GLsizei height
);
120 extern void GLAPIENTRY
121 _mesa_RenderbufferStorageMultisample(GLenum target
, GLsizei samples
,
122 GLenum internalformat
,
123 GLsizei width
, GLsizei height
);
125 extern void GLAPIENTRY
126 _es_RenderbufferStorageEXT(GLenum target
, GLenum internalFormat
,
127 GLsizei width
, GLsizei height
);
129 extern void GLAPIENTRY
130 _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target
, GLeglImageOES image
);
132 extern void GLAPIENTRY
133 _mesa_GetRenderbufferParameterivEXT(GLenum target
, GLenum pname
,
136 extern GLboolean GLAPIENTRY
137 _mesa_IsFramebufferEXT(GLuint framebuffer
);
139 extern void GLAPIENTRY
140 _mesa_BindFramebufferEXT(GLenum target
, GLuint framebuffer
);
142 extern void GLAPIENTRY
143 _mesa_DeleteFramebuffersEXT(GLsizei n
, const GLuint
*framebuffers
);
145 extern void GLAPIENTRY
146 _mesa_GenFramebuffersEXT(GLsizei n
, GLuint
*framebuffers
);
148 extern GLenum GLAPIENTRY
149 _mesa_CheckFramebufferStatusEXT(GLenum target
);
151 extern void GLAPIENTRY
152 _mesa_FramebufferTexture1DEXT(GLenum target
, GLenum attachment
,
153 GLenum textarget
, GLuint texture
, GLint level
);
155 extern void GLAPIENTRY
156 _mesa_FramebufferTexture2DEXT(GLenum target
, GLenum attachment
,
157 GLenum textarget
, GLuint texture
, GLint level
);
159 extern void GLAPIENTRY
160 _mesa_FramebufferTexture3DEXT(GLenum target
, GLenum attachment
,
161 GLenum textarget
, GLuint texture
,
162 GLint level
, GLint zoffset
);
164 extern void GLAPIENTRY
165 _mesa_FramebufferTextureLayerEXT(GLenum target
, GLenum attachment
,
166 GLuint texture
, GLint level
, GLint layer
);
168 extern void GLAPIENTRY
169 _mesa_FramebufferRenderbufferEXT(GLenum target
, GLenum attachment
,
170 GLenum renderbuffertarget
,
171 GLuint renderbuffer
);
173 extern void GLAPIENTRY
174 _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target
, GLenum attachment
,
175 GLenum pname
, GLint
*params
);
177 extern void GLAPIENTRY
178 _mesa_GenerateMipmapEXT(GLenum target
);
181 extern void GLAPIENTRY
182 _mesa_BlitFramebufferEXT(GLint srcX0
, GLint srcY0
, GLint srcX1
, GLint srcY1
,
183 GLint dstX0
, GLint dstY0
, GLint dstX1
, GLint dstY1
,
184 GLbitfield mask
, GLenum filter
);
186 extern void GLAPIENTRY
187 _mesa_FramebufferTextureARB(GLenum target
, GLenum attachment
,
188 GLuint texture
, GLint level
);
190 extern void GLAPIENTRY
191 _mesa_FramebufferTextureFaceARB(GLenum target
, GLenum attachment
,
192 GLuint texture
, GLint level
, GLenum face
);
195 #endif /* FBOBJECT_H */