renderbuffer.h revision 01e04c3f
17117f1b4Smrg/* 27117f1b4Smrg * Mesa 3-D graphics library 37117f1b4Smrg * 47117f1b4Smrg * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. 57117f1b4Smrg * 67117f1b4Smrg * Permission is hereby granted, free of charge, to any person obtaining a 77117f1b4Smrg * copy of this software and associated documentation files (the "Software"), 87117f1b4Smrg * to deal in the Software without restriction, including without limitation 97117f1b4Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 107117f1b4Smrg * and/or sell copies of the Software, and to permit persons to whom the 117117f1b4Smrg * Software is furnished to do so, subject to the following conditions: 127117f1b4Smrg * 137117f1b4Smrg * The above copyright notice and this permission notice shall be included 147117f1b4Smrg * in all copies or substantial portions of the Software. 157117f1b4Smrg * 167117f1b4Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 177117f1b4Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 187117f1b4Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19af69d88dSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20af69d88dSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21af69d88dSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22af69d88dSmrg * OTHER DEALINGS IN THE SOFTWARE. 237117f1b4Smrg */ 247117f1b4Smrg 257117f1b4Smrg 267117f1b4Smrg#ifndef RENDERBUFFER_H 277117f1b4Smrg#define RENDERBUFFER_H 287117f1b4Smrg 293464ebd5Sriastradh#include "glheader.h" 3001e04c3fSmrg#include "menums.h" 313464ebd5Sriastradh 32af69d88dSmrg#ifdef __cplusplus 33af69d88dSmrgextern "C" { 34af69d88dSmrg#endif 35af69d88dSmrg 363464ebd5Sriastradhstruct gl_context; 373464ebd5Sriastradhstruct gl_framebuffer; 383464ebd5Sriastradhstruct gl_renderbuffer; 397117f1b4Smrg 407117f1b4Smrgextern void 417117f1b4Smrg_mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name); 427117f1b4Smrg 437117f1b4Smrgextern struct gl_renderbuffer * 443464ebd5Sriastradh_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name); 457117f1b4Smrg 467117f1b4Smrgextern void 47af69d88dSmrg_mesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb); 487117f1b4Smrg 497117f1b4Smrgextern void 5001e04c3fSmrg_mesa_attach_and_own_rb(struct gl_framebuffer *fb, 5101e04c3fSmrg gl_buffer_index bufferName, 5201e04c3fSmrg struct gl_renderbuffer *rb); 5301e04c3fSmrg 5401e04c3fSmrgextern void 5501e04c3fSmrg_mesa_attach_and_reference_rb(struct gl_framebuffer *fb, 5601e04c3fSmrg gl_buffer_index bufferName, 5701e04c3fSmrg struct gl_renderbuffer *rb); 587117f1b4Smrg 597117f1b4Smrgextern void 603464ebd5Sriastradh_mesa_remove_renderbuffer(struct gl_framebuffer *fb, 613464ebd5Sriastradh gl_buffer_index bufferName); 627117f1b4Smrg 637117f1b4Smrgextern void 64af69d88dSmrg_mesa_reference_renderbuffer_(struct gl_renderbuffer **ptr, 65af69d88dSmrg struct gl_renderbuffer *rb); 667117f1b4Smrg 67af69d88dSmrgstatic inline void 68af69d88dSmrg_mesa_reference_renderbuffer(struct gl_renderbuffer **ptr, 69af69d88dSmrg struct gl_renderbuffer *rb) 70af69d88dSmrg{ 71af69d88dSmrg if (*ptr != rb) 72af69d88dSmrg _mesa_reference_renderbuffer_(ptr, rb); 73af69d88dSmrg} 74af69d88dSmrg 75af69d88dSmrg#ifdef __cplusplus 76af69d88dSmrg} 77af69d88dSmrg#endif 787117f1b4Smrg 797117f1b4Smrg#endif /* RENDERBUFFER_H */ 80