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 GLuint doubleBufferMode; 373464ebd5Sriastradh GLuint stereoMode; 383464ebd5Sriastradh 393464ebd5Sriastradh GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ 403464ebd5Sriastradh GLuint redMask, greenMask, blueMask, alphaMask; 417ec681f3Smrg GLuint redShift, greenShift, blueShift, alphaShift; 423464ebd5Sriastradh GLint rgbBits; /* total bits for rgb */ 433464ebd5Sriastradh GLint indexBits; /* total bits for colorindex */ 443464ebd5Sriastradh 453464ebd5Sriastradh GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; 463464ebd5Sriastradh GLint depthBits; 473464ebd5Sriastradh GLint stencilBits; 483464ebd5Sriastradh 493464ebd5Sriastradh GLint numAuxBuffers; 503464ebd5Sriastradh 513464ebd5Sriastradh GLint level; 523464ebd5Sriastradh 533464ebd5Sriastradh /* GLX */ 543464ebd5Sriastradh GLint visualID; 553464ebd5Sriastradh GLint visualType; /**< One of the GLX X visual types. (i.e., 563464ebd5Sriastradh * \c GLX_TRUE_COLOR, etc.) 573464ebd5Sriastradh */ 583464ebd5Sriastradh 593464ebd5Sriastradh /* EXT_visual_rating / GLX 1.2 */ 603464ebd5Sriastradh GLint visualRating; 613464ebd5Sriastradh 623464ebd5Sriastradh /* EXT_visual_info / GLX 1.2 */ 633464ebd5Sriastradh GLint transparentPixel; 643464ebd5Sriastradh /* colors are floats scaled to ints */ 653464ebd5Sriastradh GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; 663464ebd5Sriastradh GLint transparentIndex; 673464ebd5Sriastradh 683464ebd5Sriastradh /* ARB_multisample / SGIS_multisample */ 693464ebd5Sriastradh GLint sampleBuffers; 703464ebd5Sriastradh GLint samples; 713464ebd5Sriastradh 723464ebd5Sriastradh /* SGIX_fbconfig / GLX 1.3 */ 733464ebd5Sriastradh GLint drawableType; 743464ebd5Sriastradh GLint renderType; 753464ebd5Sriastradh GLint xRenderable; 763464ebd5Sriastradh GLint fbconfigID; 773464ebd5Sriastradh 783464ebd5Sriastradh /* SGIX_pbuffer / GLX 1.3 */ 793464ebd5Sriastradh GLint maxPbufferWidth; 803464ebd5Sriastradh GLint maxPbufferHeight; 813464ebd5Sriastradh GLint maxPbufferPixels; 823464ebd5Sriastradh GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ 833464ebd5Sriastradh GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ 843464ebd5Sriastradh 853464ebd5Sriastradh /* SGIX_visual_select_group */ 863464ebd5Sriastradh GLint visualSelectGroup; 873464ebd5Sriastradh 883464ebd5Sriastradh /* OML_swap_method */ 893464ebd5Sriastradh GLint swapMethod; 903464ebd5Sriastradh 913464ebd5Sriastradh GLint screen; 923464ebd5Sriastradh 933464ebd5Sriastradh /* EXT_texture_from_pixmap */ 943464ebd5Sriastradh GLint bindToTextureRgb; 953464ebd5Sriastradh GLint bindToTextureRgba; 963464ebd5Sriastradh GLint bindToMipmapTexture; 973464ebd5Sriastradh GLint bindToTextureTargets; 983464ebd5Sriastradh GLint yInverted; 993464ebd5Sriastradh 1003464ebd5Sriastradh /* EXT_framebuffer_sRGB */ 1013464ebd5Sriastradh GLint sRGBCapable; 1023464ebd5Sriastradh}; 1033464ebd5Sriastradh 1043464ebd5Sriastradhextern GLint _gl_convert_from_x_visual_type(int visualType); 1053464ebd5Sriastradh 1063464ebd5Sriastradhextern int 1073464ebd5Sriastradhglx_config_get(struct glx_config * mode, int attribute, int *value_return); 1083464ebd5Sriastradhextern struct glx_config * 1093464ebd5Sriastradhglx_config_create_list(unsigned count); 1103464ebd5Sriastradhextern void 1113464ebd5Sriastradhglx_config_destroy_list(struct glx_config *configs); 1123464ebd5Sriastradhextern struct glx_config * 1133464ebd5Sriastradhglx_config_find_visual(struct glx_config *configs, int vid); 1143464ebd5Sriastradhextern struct glx_config * 1153464ebd5Sriastradhglx_config_find_fbconfig(struct glx_config *configs, int fbid); 1163464ebd5Sriastradh 1173464ebd5Sriastradh#endif /* GLCONTEXTMODES_H */ 1183464ebd5Sriastradh 119