/*1* (C) Copyright IBM Corporation 20032* All Rights Reserved.3*4* Permission is hereby granted, free of charge, to any person obtaining a5* copy of this software and associated documentation files (the "Software"),6* to deal in the Software without restriction, including without limitation7* on the rights to use, copy, modify, merge, publish, distribute, sub8* license, and/or sell copies of the Software, and to permit persons to whom9* the Software is furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice (including the next12* paragraph) shall be included in all copies or substantial portions of the13* Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL18* VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,19* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR20* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE21* USE OR OTHER DEALINGS IN THE SOFTWARE.22*/2324/**25* \file glcontextmodes.h26* \author Ian Romanick <[email protected]>27*/2829#ifndef GLCONTEXTMODES_H30#define GLCONTEXTMODES_H3132struct glx_config {33struct glx_config * next;3435GLuint doubleBufferMode;36GLuint stereoMode;3738GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */39GLuint redMask, greenMask, blueMask, alphaMask;40GLuint redShift, greenShift, blueShift, alphaShift;41GLint rgbBits; /* total bits for rgb */42GLint indexBits; /* total bits for colorindex */4344GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;45GLint depthBits;46GLint stencilBits;4748GLint numAuxBuffers;4950GLint level;5152/* GLX */53GLint visualID;54GLint visualType; /**< One of the GLX X visual types. (i.e.,55* \c GLX_TRUE_COLOR, etc.)56*/5758/* EXT_visual_rating / GLX 1.2 */59GLint visualRating;6061/* EXT_visual_info / GLX 1.2 */62GLint transparentPixel;63/* colors are floats scaled to ints */64GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;65GLint transparentIndex;6667/* ARB_multisample / SGIS_multisample */68GLint sampleBuffers;69GLint samples;7071/* SGIX_fbconfig / GLX 1.3 */72GLint drawableType;73GLint renderType;74GLint xRenderable;75GLint fbconfigID;7677/* SGIX_pbuffer / GLX 1.3 */78GLint maxPbufferWidth;79GLint maxPbufferHeight;80GLint maxPbufferPixels;81GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */82GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */8384/* SGIX_visual_select_group */85GLint visualSelectGroup;8687/* OML_swap_method */88GLint swapMethod;8990GLint screen;9192/* EXT_texture_from_pixmap */93GLint bindToTextureRgb;94GLint bindToTextureRgba;95GLint bindToMipmapTexture;96GLint bindToTextureTargets;97GLint yInverted;9899/* EXT_framebuffer_sRGB */100GLint sRGBCapable;101};102103extern GLint _gl_convert_from_x_visual_type(int visualType);104105extern int106glx_config_get(struct glx_config * mode, int attribute, int *value_return);107extern struct glx_config *108glx_config_create_list(unsigned count);109extern void110glx_config_destroy_list(struct glx_config *configs);111extern struct glx_config *112glx_config_find_visual(struct glx_config *configs, int vid);113extern struct glx_config *114glx_config_find_fbconfig(struct glx_config *configs, int fbid);115116#endif /* GLCONTEXTMODES_H */117118119120