glxconfig.h revision 3464ebd5
13464ebd5Sriastradh/* 23464ebd5Sriastradh * (C) Copyright IBM Corporation 2003 33464ebd5Sriastradh * All Rights Reserved. 43464ebd5Sriastradh * 53464ebd5Sriastradh * Permission is hereby granted, free of charge, to any person obtaining a 63464ebd5Sriastradh * copy of this software and associated documentation files (the "Software"), 73464ebd5Sriastradh * to deal in the Software without restriction, including without limitation 83464ebd5Sriastradh * on the rights to use, copy, modify, merge, publish, distribute, sub 93464ebd5Sriastradh * license, and/or sell copies of the Software, and to permit persons to whom 103464ebd5Sriastradh * the Software is furnished to do so, subject to the following conditions: 113464ebd5Sriastradh * 123464ebd5Sriastradh * The above copyright notice and this permission notice (including the next 133464ebd5Sriastradh * paragraph) shall be included in all copies or substantial portions of the 143464ebd5Sriastradh * Software. 153464ebd5Sriastradh * 163464ebd5Sriastradh * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 173464ebd5Sriastradh * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 183464ebd5Sriastradh * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 193464ebd5Sriastradh * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 203464ebd5Sriastradh * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 213464ebd5Sriastradh * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 223464ebd5Sriastradh * USE OR OTHER DEALINGS IN THE SOFTWARE. 233464ebd5Sriastradh */ 243464ebd5Sriastradh 253464ebd5Sriastradh/** 263464ebd5Sriastradh * \file glcontextmodes.h 273464ebd5Sriastradh * \author Ian Romanick <idr@us.ibm.com> 283464ebd5Sriastradh */ 293464ebd5Sriastradh 303464ebd5Sriastradh#ifndef GLCONTEXTMODES_H 313464ebd5Sriastradh#define GLCONTEXTMODES_H 323464ebd5Sriastradh 333464ebd5Sriastradhstruct glx_config { 343464ebd5Sriastradh struct glx_config * next; 353464ebd5Sriastradh 363464ebd5Sriastradh GLboolean rgbMode; 373464ebd5Sriastradh GLboolean floatMode; 383464ebd5Sriastradh GLboolean colorIndexMode; 393464ebd5Sriastradh GLuint doubleBufferMode; 403464ebd5Sriastradh GLuint stereoMode; 413464ebd5Sriastradh 423464ebd5Sriastradh GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ 433464ebd5Sriastradh GLuint redMask, greenMask, blueMask, alphaMask; 443464ebd5Sriastradh GLint rgbBits; /* total bits for rgb */ 453464ebd5Sriastradh GLint indexBits; /* total bits for colorindex */ 463464ebd5Sriastradh 473464ebd5Sriastradh GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; 483464ebd5Sriastradh GLint depthBits; 493464ebd5Sriastradh GLint stencilBits; 503464ebd5Sriastradh 513464ebd5Sriastradh GLint numAuxBuffers; 523464ebd5Sriastradh 533464ebd5Sriastradh GLint level; 543464ebd5Sriastradh 553464ebd5Sriastradh GLint pixmapMode; 563464ebd5Sriastradh 573464ebd5Sriastradh /* GLX */ 583464ebd5Sriastradh GLint visualID; 593464ebd5Sriastradh GLint visualType; /**< One of the GLX X visual types. (i.e., 603464ebd5Sriastradh * \c GLX_TRUE_COLOR, etc.) 613464ebd5Sriastradh */ 623464ebd5Sriastradh 633464ebd5Sriastradh /* EXT_visual_rating / GLX 1.2 */ 643464ebd5Sriastradh GLint visualRating; 653464ebd5Sriastradh 663464ebd5Sriastradh /* EXT_visual_info / GLX 1.2 */ 673464ebd5Sriastradh GLint transparentPixel; 683464ebd5Sriastradh /* colors are floats scaled to ints */ 693464ebd5Sriastradh GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; 703464ebd5Sriastradh GLint transparentIndex; 713464ebd5Sriastradh 723464ebd5Sriastradh /* ARB_multisample / SGIS_multisample */ 733464ebd5Sriastradh GLint sampleBuffers; 743464ebd5Sriastradh GLint samples; 753464ebd5Sriastradh 763464ebd5Sriastradh /* SGIX_fbconfig / GLX 1.3 */ 773464ebd5Sriastradh GLint drawableType; 783464ebd5Sriastradh GLint renderType; 793464ebd5Sriastradh GLint xRenderable; 803464ebd5Sriastradh GLint fbconfigID; 813464ebd5Sriastradh 823464ebd5Sriastradh /* SGIX_pbuffer / GLX 1.3 */ 833464ebd5Sriastradh GLint maxPbufferWidth; 843464ebd5Sriastradh GLint maxPbufferHeight; 853464ebd5Sriastradh GLint maxPbufferPixels; 863464ebd5Sriastradh GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ 873464ebd5Sriastradh GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ 883464ebd5Sriastradh 893464ebd5Sriastradh /* SGIX_visual_select_group */ 903464ebd5Sriastradh GLint visualSelectGroup; 913464ebd5Sriastradh 923464ebd5Sriastradh /* OML_swap_method */ 933464ebd5Sriastradh GLint swapMethod; 943464ebd5Sriastradh 953464ebd5Sriastradh GLint screen; 963464ebd5Sriastradh 973464ebd5Sriastradh /* EXT_texture_from_pixmap */ 983464ebd5Sriastradh GLint bindToTextureRgb; 993464ebd5Sriastradh GLint bindToTextureRgba; 1003464ebd5Sriastradh GLint bindToMipmapTexture; 1013464ebd5Sriastradh GLint bindToTextureTargets; 1023464ebd5Sriastradh GLint yInverted; 1033464ebd5Sriastradh 1043464ebd5Sriastradh /* EXT_framebuffer_sRGB */ 1053464ebd5Sriastradh GLint sRGBCapable; 1063464ebd5Sriastradh}; 1073464ebd5Sriastradh 1083464ebd5Sriastradh#define __GLX_MIN_CONFIG_PROPS 18 1093464ebd5Sriastradh#define __GLX_MAX_CONFIG_PROPS 500 1103464ebd5Sriastradh#define __GLX_EXT_CONFIG_PROPS 10 1113464ebd5Sriastradh 1123464ebd5Sriastradh/* 1133464ebd5Sriastradh** Since we send all non-core visual properties as token, value pairs, 1143464ebd5Sriastradh** we require 2 words across the wire. In order to maintain backwards 1153464ebd5Sriastradh** compatibility, we need to send the total number of words that the 1163464ebd5Sriastradh** VisualConfigs are sent back in so old libraries can simply "ignore" 1173464ebd5Sriastradh** the new properties. 1183464ebd5Sriastradh*/ 1193464ebd5Sriastradh#define __GLX_TOTAL_CONFIG \ 1203464ebd5Sriastradh (__GLX_MIN_CONFIG_PROPS + 2 * __GLX_EXT_CONFIG_PROPS) 1213464ebd5Sriastradh 1223464ebd5Sriastradhextern GLint _gl_convert_from_x_visual_type(int visualType); 1233464ebd5Sriastradh 1243464ebd5Sriastradhextern int 1253464ebd5Sriastradhglx_config_get(struct glx_config * mode, int attribute, int *value_return); 1263464ebd5Sriastradhextern struct glx_config * 1273464ebd5Sriastradhglx_config_create_list(unsigned count); 1283464ebd5Sriastradhextern void 1293464ebd5Sriastradhglx_config_destroy_list(struct glx_config *configs); 1303464ebd5Sriastradhextern struct glx_config * 1313464ebd5Sriastradhglx_config_find_visual(struct glx_config *configs, int vid); 1323464ebd5Sriastradhextern struct glx_config * 1333464ebd5Sriastradhglx_config_find_fbconfig(struct glx_config *configs, int fbid); 1343464ebd5Sriastradh 1353464ebd5Sriastradh#endif /* GLCONTEXTMODES_H */ 1363464ebd5Sriastradh 137