1e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul/* 2e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * Mesa 3-D graphics library 3f084f60f8bdba23b3f6125549045c0791d3fe138Brian Paul * Version: 6.5 4e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * 57275d4d097f97a2154dfe8fa573dc193cb5b4bf1Brian Paul * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 6e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * 7e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * Permission is hereby granted, free of charge, to any person obtaining a 8e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * copy of this software and associated documentation files (the "Software"), 9e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * to deal in the Software without restriction, including without limitation 10e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * and/or sell copies of the Software, and to permit persons to whom the 12e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * Software is furnished to do so, subject to the following conditions: 13e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * 14e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * The above copyright notice and this permission notice shall be included 15e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * in all copies or substantial portions of the Software. 16e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * 17e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul */ 24e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 25e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 26e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul#ifndef FRAMEBUFFER_H 27e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul#define FRAMEBUFFER_H 28e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 2963f1740a5d9a4ed36026da3e4c1370441218f919Vinson Lee#include "glheader.h" 3063f1740a5d9a4ed36026da3e4c1370441218f919Vinson Lee 3163f1740a5d9a4ed36026da3e4c1370441218f919Vinson Leestruct gl_config; 3263f1740a5d9a4ed36026da3e4c1370441218f919Vinson Leestruct gl_context; 33e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 34e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern struct gl_framebuffer * 35d3491e775fb07f891463b2185d74bbad62f3ed24Kristian Høgsberg_mesa_create_framebuffer(const struct gl_config *visual); 36e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 37e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern struct gl_framebuffer * 38f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_new_framebuffer(struct gl_context *ctx, GLuint name); 39e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 40e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern void 412ec50d256d49ff3b987459ed42a5dc66f02a6b9dFrancisco Jerez_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb, 42d3491e775fb07f891463b2185d74bbad62f3ed24Kristian Høgsberg const struct gl_config *visual); 432ec50d256d49ff3b987459ed42a5dc66f02a6b9dFrancisco Jerez 442ec50d256d49ff3b987459ed42a5dc66f02a6b9dFrancisco Jerezextern void 452ec50d256d49ff3b987459ed42a5dc66f02a6b9dFrancisco Jerez_mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name); 46e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 47e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern void 48e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul_mesa_destroy_framebuffer(struct gl_framebuffer *buffer); 49e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 50e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern void 51e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul_mesa_free_framebuffer_data(struct gl_framebuffer *buffer); 52e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 53e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern void 545db7723ada0be301b7f8eed754cb62f8a84d6768Brian Paul_mesa_reference_framebuffer_(struct gl_framebuffer **ptr, 555db7723ada0be301b7f8eed754cb62f8a84d6768Brian Paul struct gl_framebuffer *fb); 565db7723ada0be301b7f8eed754cb62f8a84d6768Brian Paul 579520f483b8f1e45fa474674b415554988de5d8d3Brian Paulstatic inline void 58a510bc3ee1a696da120c09ee4ec33dc033f671acBrian_mesa_reference_framebuffer(struct gl_framebuffer **ptr, 595db7723ada0be301b7f8eed754cb62f8a84d6768Brian Paul struct gl_framebuffer *fb) 605db7723ada0be301b7f8eed754cb62f8a84d6768Brian Paul{ 615db7723ada0be301b7f8eed754cb62f8a84d6768Brian Paul if (*ptr != fb) 625db7723ada0be301b7f8eed754cb62f8a84d6768Brian Paul _mesa_reference_framebuffer_(ptr, fb); 635db7723ada0be301b7f8eed754cb62f8a84d6768Brian Paul} 64a510bc3ee1a696da120c09ee4ec33dc033f671acBrian 65a510bc3ee1a696da120c09ee4ec33dc033f671acBrianextern void 66f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb, 67e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul GLuint width, GLuint height); 68e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 69e48defc98045f419e71ca13e4f45470b2336ecafBrian Paul 70e48defc98045f419e71ca13e4f45470b2336ecafBrian Paulextern void 71f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_resizebuffers( struct gl_context *ctx ); 72e48defc98045f419e71ca13e4f45470b2336ecafBrian Paul 73e48defc98045f419e71ca13e4f45470b2336ecafBrian Paulextern void GLAPIENTRY 74e48defc98045f419e71ca13e4f45470b2336ecafBrian Paul_mesa_ResizeBuffersMESA( void ); 75e48defc98045f419e71ca13e4f45470b2336ecafBrian Paul 76e48defc98045f419e71ca13e4f45470b2336ecafBrian Paul 77e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern void 78f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_update_draw_buffer_bounds(struct gl_context *ctx); 79e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 80e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern void 81059cca92a819e20e0d834605a3a7d277eaf88d9fEric Anholt_mesa_update_framebuffer_visual(struct gl_context *ctx, 82059cca92a819e20e0d834605a3a7d277eaf88d9fEric Anholt struct gl_framebuffer *fb); 83e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 84e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paulextern void 85f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_update_framebuffer(struct gl_context *ctx); 86e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul 877275d4d097f97a2154dfe8fa573dc193cb5b4bf1Brian Paulextern GLboolean 88f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_source_buffer_exists(struct gl_context *ctx, GLenum format); 897275d4d097f97a2154dfe8fa573dc193cb5b4bf1Brian Paul 907275d4d097f97a2154dfe8fa573dc193cb5b4bf1Brian Paulextern GLboolean 91f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format); 927275d4d097f97a2154dfe8fa573dc193cb5b4bf1Brian Paul 93cd6b8dd9e82fedc55d033131fbc0f8ee950567c8Eric Anholtextern GLenum 94f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_get_color_read_type(struct gl_context *ctx); 95cd6b8dd9e82fedc55d033131fbc0f8ee950567c8Eric Anholt 96cd6b8dd9e82fedc55d033131fbc0f8ee950567c8Eric Anholtextern GLenum 97f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_get_color_read_format(struct gl_context *ctx); 987275d4d097f97a2154dfe8fa573dc193cb5b4bf1Brian Paul 99421e9aa71c9dc1c1462e55338dc5ceafb773e201Brian Paulextern void 100421e9aa71c9dc1c1462e55338dc5ceafb773e201Brian Paul_mesa_print_framebuffer(const struct gl_framebuffer *fb); 101421e9aa71c9dc1c1462e55338dc5ceafb773e201Brian Paul 102e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul#endif /* FRAMEBUFFER_H */ 103