stw_pixelformat.h revision 0e471ac45771393ea74178eb98f41b904168cf64
1/************************************************************************** 2 * 3 * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. 4 * 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 8 * "Software"), to deal in the Software without restriction, including 9 * without limitation the rights to use, copy, modify, merge, publish, 10 * distribute, sub license, and/or sell copies of the Software, and to 11 * permit persons to whom the Software is furnished to do so, subject to 12 * the following conditions: 13 * 14 * The above copyright notice and this permission notice (including the 15 * next paragraph) shall be included in all copies or substantial portions 16 * of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 * 26 **************************************************************************/ 27 28#ifndef PIXELFORMAT_H 29#define PIXELFORMAT_H 30 31#define PF_FLAG_DOUBLEBUFFER 0x00000001 32#define PF_FLAG_MULTISAMPLED 0x00000002 33 34struct pixelformat_color_info 35{ 36 uint redbits; 37 uint redshift; 38 uint greenbits; 39 uint greenshift; 40 uint bluebits; 41 uint blueshift; 42}; 43 44struct pixelformat_alpha_info 45{ 46 uint alphabits; 47 uint alphashift; 48}; 49 50struct pixelformat_depth_info 51{ 52 uint depthbits; 53 uint stencilbits; 54}; 55 56struct pixelformat_info 57{ 58 uint flags; 59 struct pixelformat_color_info color; 60 struct pixelformat_alpha_info alpha; 61 struct pixelformat_depth_info depth; 62}; 63 64void 65pixelformat_init( void ); 66 67uint 68pixelformat_get_count( void ); 69 70uint 71pixelformat_get_extended_count( void ); 72 73const struct pixelformat_info * 74pixelformat_get_info( uint index ); 75 76#endif /* PIXELFORMAT_H */ 77