renderbuffer.h revision 3464ebd5
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 293464ebd5Sriastradh#include "glheader.h" 303464ebd5Sriastradh#include "mtypes.h" 313464ebd5Sriastradh 323464ebd5Sriastradhstruct gl_context; 333464ebd5Sriastradhstruct gl_framebuffer; 343464ebd5Sriastradhstruct gl_renderbuffer; 357117f1b4Smrg 367117f1b4Smrgextern void 377117f1b4Smrg_mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name); 387117f1b4Smrg 397117f1b4Smrgextern struct gl_renderbuffer * 403464ebd5Sriastradh_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name); 417117f1b4Smrg 427117f1b4Smrgextern void 437117f1b4Smrg_mesa_delete_renderbuffer(struct gl_renderbuffer *rb); 447117f1b4Smrg 457117f1b4Smrg 467117f1b4Smrgextern struct gl_renderbuffer * 473464ebd5Sriastradh_mesa_new_soft_renderbuffer(struct gl_context *ctx, GLuint name); 487117f1b4Smrg 493464ebd5Sriastradhextern void 503464ebd5Sriastradh_mesa_set_renderbuffer_accessors(struct gl_renderbuffer *rb); 517117f1b4Smrg 527117f1b4Smrgextern GLboolean 533464ebd5Sriastradh_mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, 547117f1b4Smrg GLenum internalFormat, 557117f1b4Smrg GLuint width, GLuint height); 567117f1b4Smrg 577117f1b4Smrgextern GLboolean 583464ebd5Sriastradh_mesa_add_color_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, 597117f1b4Smrg GLuint rgbBits, GLuint alphaBits, 607117f1b4Smrg GLboolean frontLeft, GLboolean backLeft, 617117f1b4Smrg GLboolean frontRight, GLboolean backRight); 627117f1b4Smrg 637117f1b4Smrgextern GLboolean 643464ebd5Sriastradh_mesa_add_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, 657117f1b4Smrg GLuint alphaBits, 667117f1b4Smrg GLboolean frontLeft, GLboolean backLeft, 677117f1b4Smrg GLboolean frontRight, GLboolean backRight); 687117f1b4Smrg 697117f1b4Smrgextern void 703464ebd5Sriastradh_mesa_copy_soft_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb); 717117f1b4Smrg 727117f1b4Smrgextern GLboolean 733464ebd5Sriastradh_mesa_add_depth_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, 747117f1b4Smrg GLuint depthBits); 757117f1b4Smrg 767117f1b4Smrgextern GLboolean 773464ebd5Sriastradh_mesa_add_stencil_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, 787117f1b4Smrg GLuint stencilBits); 797117f1b4Smrg 807117f1b4Smrg 817117f1b4Smrgextern GLboolean 823464ebd5Sriastradh_mesa_add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, 837117f1b4Smrg GLuint redBits, GLuint greenBits, 847117f1b4Smrg GLuint blueBits, GLuint alphaBits); 857117f1b4Smrg 867117f1b4Smrgextern GLboolean 873464ebd5Sriastradh_mesa_add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, 887117f1b4Smrg GLuint bits, GLuint numBuffers); 897117f1b4Smrg 907117f1b4Smrgextern void 917117f1b4Smrg_mesa_add_soft_renderbuffers(struct gl_framebuffer *fb, 927117f1b4Smrg GLboolean color, 937117f1b4Smrg GLboolean depth, 947117f1b4Smrg GLboolean stencil, 957117f1b4Smrg GLboolean accum, 967117f1b4Smrg GLboolean alpha, 977117f1b4Smrg GLboolean aux); 987117f1b4Smrg 997117f1b4Smrgextern void 1007117f1b4Smrg_mesa_add_renderbuffer(struct gl_framebuffer *fb, 1013464ebd5Sriastradh gl_buffer_index bufferName, struct gl_renderbuffer *rb); 1027117f1b4Smrg 1037117f1b4Smrgextern void 1043464ebd5Sriastradh_mesa_remove_renderbuffer(struct gl_framebuffer *fb, 1053464ebd5Sriastradh gl_buffer_index bufferName); 1067117f1b4Smrg 1077117f1b4Smrgextern void 1087117f1b4Smrg_mesa_reference_renderbuffer(struct gl_renderbuffer **ptr, 1097117f1b4Smrg struct gl_renderbuffer *rb); 1107117f1b4Smrg 1117117f1b4Smrg 1127117f1b4Smrg#endif /* RENDERBUFFER_H */ 113