mesa: remove outdated version lines in comments
[mesa.git] / src / mesa / main / fbobject.h
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
5 *
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:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
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.
23 */
24
25
26 #ifndef FBOBJECT_H
27 #define FBOBJECT_H
28
29 #include "compiler.h"
30 #include "glheader.h"
31
32 struct gl_context;
33 struct gl_texture_object;
34
35
36 /**
37 * Is the given FBO a user-created FBO?
38 */
39 static inline GLboolean
40 _mesa_is_user_fbo(const struct gl_framebuffer *fb)
41 {
42 return fb->Name != 0;
43 }
44
45
46 /**
47 * Is the given FBO a window system FBO (like an X window)?
48 */
49 static inline GLboolean
50 _mesa_is_winsys_fbo(const struct gl_framebuffer *fb)
51 {
52 return fb->Name == 0;
53 }
54
55
56
57 extern void
58 _mesa_init_fbobjects(struct gl_context *ctx);
59
60 extern struct gl_framebuffer *
61 _mesa_get_incomplete_framebuffer(void);
62
63 extern struct gl_renderbuffer *
64 _mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id);
65
66 extern struct gl_framebuffer *
67 _mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id);
68
69 extern struct gl_renderbuffer_attachment *
70 _mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
71 GLenum attachment);
72
73 extern void
74 _mesa_remove_attachment(struct gl_context *ctx,
75 struct gl_renderbuffer_attachment *att);
76
77 extern void
78 _mesa_set_texture_attachment(struct gl_context *ctx,
79 struct gl_framebuffer *fb,
80 struct gl_renderbuffer_attachment *att,
81 struct gl_texture_object *texObj,
82 GLenum texTarget, GLuint level, GLuint zoffset,
83 GLboolean layered);
84
85 extern void
86 _mesa_set_renderbuffer_attachment(struct gl_context *ctx,
87 struct gl_renderbuffer_attachment *att,
88 struct gl_renderbuffer *rb);
89
90 void
91 _mesa_update_texture_renderbuffer(struct gl_context *ctx,
92 struct gl_framebuffer *fb,
93 struct gl_renderbuffer_attachment *att);
94
95 extern void
96 _mesa_framebuffer_renderbuffer(struct gl_context *ctx,
97 struct gl_framebuffer *fb,
98 GLenum attachment, struct gl_renderbuffer *rb);
99
100 extern void
101 _mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb);
102
103 extern GLboolean
104 _mesa_has_depthstencil_combined(const struct gl_framebuffer *fb);
105
106 extern void
107 _mesa_test_framebuffer_completeness(struct gl_context *ctx,
108 struct gl_framebuffer *fb);
109
110 extern GLboolean
111 _mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat);
112
113 extern GLenum
114 _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat);
115
116 extern GLboolean GLAPIENTRY
117 _mesa_IsRenderbuffer(GLuint renderbuffer);
118
119 extern void GLAPIENTRY
120 _mesa_BindRenderbuffer(GLenum target, GLuint renderbuffer);
121
122 extern void GLAPIENTRY
123 _mesa_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers);
124
125 extern void GLAPIENTRY
126 _mesa_GenRenderbuffers(GLsizei n, GLuint *renderbuffers);
127
128 extern void GLAPIENTRY
129 _mesa_RenderbufferStorage(GLenum target, GLenum internalformat,
130 GLsizei width, GLsizei height);
131
132 extern void GLAPIENTRY
133 _mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
134 GLenum internalformat,
135 GLsizei width, GLsizei height);
136
137 extern void GLAPIENTRY
138 _es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
139 GLsizei width, GLsizei height);
140
141 extern void GLAPIENTRY
142 _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
143
144 extern void GLAPIENTRY
145 _mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname,
146 GLint *params);
147
148 extern GLboolean GLAPIENTRY
149 _mesa_IsFramebuffer(GLuint framebuffer);
150
151 extern void GLAPIENTRY
152 _mesa_BindFramebuffer(GLenum target, GLuint framebuffer);
153
154 extern void GLAPIENTRY
155 _mesa_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers);
156
157 extern void GLAPIENTRY
158 _mesa_GenFramebuffers(GLsizei n, GLuint *framebuffers);
159
160 extern GLenum GLAPIENTRY
161 _mesa_CheckFramebufferStatus(GLenum target);
162
163 extern void GLAPIENTRY
164 _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
165 GLenum textarget, GLuint texture, GLint level);
166
167 extern void GLAPIENTRY
168 _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
169 GLenum textarget, GLuint texture, GLint level);
170
171 extern void GLAPIENTRY
172 _mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
173 GLenum textarget, GLuint texture,
174 GLint level, GLint zoffset);
175
176 extern void GLAPIENTRY
177 _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
178 GLuint texture, GLint level, GLint layer);
179
180 extern void GLAPIENTRY
181 _mesa_FramebufferTexture(GLenum target, GLenum attachment,
182 GLuint texture, GLint level);
183
184 extern void GLAPIENTRY
185 _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
186 GLenum renderbuffertarget,
187 GLuint renderbuffer);
188
189 extern void GLAPIENTRY
190 _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
191 GLenum pname, GLint *params);
192
193 extern void GLAPIENTRY
194 _mesa_GenerateMipmap(GLenum target);
195
196
197 extern void GLAPIENTRY
198 _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
199 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
200 GLbitfield mask, GLenum filter);
201
202 extern void GLAPIENTRY
203 _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments,
204 const GLenum *attachments, GLint x, GLint y,
205 GLsizei width, GLsizei height);
206
207 extern void GLAPIENTRY
208 _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments,
209 const GLenum *attachments);
210
211 extern void GLAPIENTRY
212 _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments,
213 const GLenum *attachments);
214
215 #endif /* FBOBJECT_H */