renderbuffer.h revision 7117f1b4
17117f1b4Smrg/*
27117f1b4Smrg * Mesa 3-D graphics library
37117f1b4Smrg * Version:  6.5
47117f1b4Smrg *
57117f1b4Smrg * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
67117f1b4Smrg *
77117f1b4Smrg * Permission is hereby granted, free of charge, to any person obtaining a
87117f1b4Smrg * copy of this software and associated documentation files (the "Software"),
97117f1b4Smrg * to deal in the Software without restriction, including without limitation
107117f1b4Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
117117f1b4Smrg * and/or sell copies of the Software, and to permit persons to whom the
127117f1b4Smrg * Software is furnished to do so, subject to the following conditions:
137117f1b4Smrg *
147117f1b4Smrg * The above copyright notice and this permission notice shall be included
157117f1b4Smrg * in all copies or substantial portions of the Software.
167117f1b4Smrg *
177117f1b4Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
187117f1b4Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
197117f1b4Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
207117f1b4Smrg * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
217117f1b4Smrg * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
227117f1b4Smrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
237117f1b4Smrg */
247117f1b4Smrg
257117f1b4Smrg
267117f1b4Smrg#ifndef RENDERBUFFER_H
277117f1b4Smrg#define RENDERBUFFER_H
287117f1b4Smrg
297117f1b4Smrg
307117f1b4Smrgextern void
317117f1b4Smrg_mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name);
327117f1b4Smrg
337117f1b4Smrgextern struct gl_renderbuffer *
347117f1b4Smrg_mesa_new_renderbuffer(GLcontext *ctx, GLuint name);
357117f1b4Smrg
367117f1b4Smrgextern void
377117f1b4Smrg_mesa_delete_renderbuffer(struct gl_renderbuffer *rb);
387117f1b4Smrg
397117f1b4Smrg
407117f1b4Smrgextern struct gl_renderbuffer *
417117f1b4Smrg_mesa_new_soft_renderbuffer(GLcontext *ctx, GLuint name);
427117f1b4Smrg
437117f1b4Smrg
447117f1b4Smrgextern GLboolean
457117f1b4Smrg_mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
467117f1b4Smrg                                GLenum internalFormat,
477117f1b4Smrg                                GLuint width, GLuint height);
487117f1b4Smrg
497117f1b4Smrgextern GLboolean
507117f1b4Smrg_mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
517117f1b4Smrg                              GLuint rgbBits, GLuint alphaBits,
527117f1b4Smrg                              GLboolean frontLeft, GLboolean backLeft,
537117f1b4Smrg                              GLboolean frontRight, GLboolean backRight);
547117f1b4Smrg
557117f1b4Smrgextern GLboolean
567117f1b4Smrg_mesa_add_color_index_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
577117f1b4Smrg                                    GLuint indexBits,
587117f1b4Smrg                                    GLboolean frontLeft, GLboolean backLeft,
597117f1b4Smrg                                    GLboolean frontRight, GLboolean backRight);
607117f1b4Smrg
617117f1b4Smrgextern GLboolean
627117f1b4Smrg_mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
637117f1b4Smrg                              GLuint alphaBits,
647117f1b4Smrg                              GLboolean frontLeft, GLboolean backLeft,
657117f1b4Smrg                              GLboolean frontRight, GLboolean backRight);
667117f1b4Smrg
677117f1b4Smrgextern void
687117f1b4Smrg_mesa_copy_soft_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb);
697117f1b4Smrg
707117f1b4Smrgextern GLboolean
717117f1b4Smrg_mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
727117f1b4Smrg                             GLuint depthBits);
737117f1b4Smrg
747117f1b4Smrgextern GLboolean
757117f1b4Smrg_mesa_add_stencil_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
767117f1b4Smrg                               GLuint stencilBits);
777117f1b4Smrg
787117f1b4Smrg
797117f1b4Smrgextern GLboolean
807117f1b4Smrg_mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
817117f1b4Smrg                             GLuint redBits, GLuint greenBits,
827117f1b4Smrg                             GLuint blueBits, GLuint alphaBits);
837117f1b4Smrg
847117f1b4Smrgextern GLboolean
857117f1b4Smrg_mesa_add_aux_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
867117f1b4Smrg                            GLuint bits, GLuint numBuffers);
877117f1b4Smrg
887117f1b4Smrgextern void
897117f1b4Smrg_mesa_add_soft_renderbuffers(struct gl_framebuffer *fb,
907117f1b4Smrg                             GLboolean color,
917117f1b4Smrg                             GLboolean depth,
927117f1b4Smrg                             GLboolean stencil,
937117f1b4Smrg                             GLboolean accum,
947117f1b4Smrg                             GLboolean alpha,
957117f1b4Smrg                             GLboolean aux);
967117f1b4Smrg
977117f1b4Smrgextern void
987117f1b4Smrg_mesa_add_renderbuffer(struct gl_framebuffer *fb,
997117f1b4Smrg                       GLuint bufferName, struct gl_renderbuffer *rb);
1007117f1b4Smrg
1017117f1b4Smrgextern void
1027117f1b4Smrg_mesa_remove_renderbuffer(struct gl_framebuffer *fb, GLuint bufferName);
1037117f1b4Smrg
1047117f1b4Smrgextern void
1057117f1b4Smrg_mesa_reference_renderbuffer(struct gl_renderbuffer **ptr,
1067117f1b4Smrg                             struct gl_renderbuffer *rb);
1077117f1b4Smrg
1087117f1b4Smrgextern struct gl_renderbuffer *
1097117f1b4Smrg_mesa_new_depthstencil_renderbuffer(GLcontext *ctx, GLuint name);
1107117f1b4Smrg
1117117f1b4Smrg
1127117f1b4Smrg#endif /* RENDERBUFFER_H */
113