Back to index

x11proto-gl  1.4.16
glxint.h
Go to the documentation of this file.
00001 #ifndef __GLX_glxint_h__
00002 #define __GLX_glxint_h__
00003 
00004 /*
00005  * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
00006  * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
00007  *
00008  * Permission is hereby granted, free of charge, to any person obtaining a
00009  * copy of this software and associated documentation files (the "Software"),
00010  * to deal in the Software without restriction, including without limitation
00011  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00012  * and/or sell copies of the Software, and to permit persons to whom the
00013  * Software is furnished to do so, subject to the following conditions:
00014  *
00015  * The above copyright notice including the dates of first publication and
00016  * either this permission notice or a reference to
00017  * http://oss.sgi.com/projects/FreeB/
00018  * shall be included in all copies or substantial portions of the Software.
00019  *
00020  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00021  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00022  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00023  * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
00024  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
00025  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00026  * SOFTWARE.
00027  *
00028  * Except as contained in this notice, the name of Silicon Graphics, Inc.
00029  * shall not be used in advertising or otherwise to promote the sale, use or
00030  * other dealings in this Software without prior written authorization from
00031  * Silicon Graphics, Inc.
00032  */
00033 
00034 #include <X11/X.h>
00035 #include <X11/Xdefs.h>
00036 #include "GL/gl.h"
00037 
00038 typedef struct __GLXvisualConfigRec __GLXvisualConfig;
00039 typedef struct __GLXFBConfigRec __GLXFBConfig;
00040 
00041 struct __GLXvisualConfigRec {
00042     VisualID vid;
00043     int class;
00044     Bool rgba;
00045     int redSize, greenSize, blueSize, alphaSize;
00046     unsigned long redMask, greenMask, blueMask, alphaMask;
00047     int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize;
00048     Bool doubleBuffer;
00049     Bool stereo;
00050     int bufferSize;
00051     int depthSize;
00052     int stencilSize;
00053     int auxBuffers;
00054     int level;
00055     /* Start of Extended Visual Properties */
00056     int visualRating;              /* visual_rating extension */
00057     int transparentPixel;   /* visual_info extension */
00058                             /*    colors are floats scaled to ints */
00059     int transparentRed, transparentGreen, transparentBlue, transparentAlpha;
00060     int transparentIndex;
00061     int multiSampleSize;
00062     int nMultiSampleBuffers;
00063     int visualSelectGroup;
00064 };
00065 
00066 #define __GLX_MIN_CONFIG_PROPS     18
00067 #define __GLX_MAX_CONFIG_PROPS     500
00068 
00069 #define __GLX_EXT_CONFIG_PROPS     10
00070 
00071 /*
00072 ** Since we send all non-core visual properties as token, value pairs,
00073 ** we require 2 words across the wire. In order to maintain backwards
00074 ** compatibility, we need to send the total number of words that the
00075 ** VisualConfigs are sent back in so old libraries can simply "ignore"
00076 ** the new properties. 
00077 */
00078 #define __GLX_TOTAL_CONFIG       (__GLX_MIN_CONFIG_PROPS +      \
00079                                     2 * __GLX_EXT_CONFIG_PROPS)
00080 
00081 struct __GLXFBConfigRec {
00082     int visualType;
00083     int transparentType;
00084                                 /*    colors are floats scaled to ints */
00085     int transparentRed, transparentGreen, transparentBlue, transparentAlpha;
00086     int transparentIndex;
00087 
00088     int visualCaveat;
00089 
00090     int associatedVisualId;
00091     int screen;
00092 
00093     int drawableType;
00094     int renderType;
00095 
00096     int maxPbufferWidth, maxPbufferHeight, maxPbufferPixels;
00097     int optimalPbufferWidth, optimalPbufferHeight;  /* for SGIX_pbuffer */
00098 
00099     int visualSelectGroup;  /* visuals grouped by select priority */
00100 
00101     unsigned int id;          
00102 
00103     GLboolean rgbMode;
00104     GLboolean colorIndexMode;
00105     GLboolean doubleBufferMode;
00106     GLboolean stereoMode;
00107     GLboolean haveAccumBuffer;
00108     GLboolean haveDepthBuffer;
00109     GLboolean haveStencilBuffer;
00110 
00111     /* The number of bits present in various buffers */
00112     GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
00113     GLint depthBits;
00114     GLint stencilBits;
00115     GLint indexBits;
00116     GLint redBits, greenBits, blueBits, alphaBits;
00117     GLuint redMask, greenMask, blueMask, alphaMask;
00118 
00119     GLuint multiSampleSize;     /* Number of samples per pixel (0 if no ms) */
00120 
00121     GLuint nMultiSampleBuffers; /* Number of availble ms buffers */
00122     GLint maxAuxBuffers;
00123 
00124     /* frame buffer level */
00125     GLint level;
00126 
00127     /* color ranges (for SGI_color_range) */
00128     GLboolean extendedRange;
00129     GLdouble minRed, maxRed;
00130     GLdouble minGreen, maxGreen;
00131     GLdouble minBlue, maxBlue;
00132     GLdouble minAlpha, maxAlpha;
00133 };
00134 
00135 #define __GLX_TOTAL_FBCONFIG_PROPS  35
00136 
00137 #endif /* !__GLX_glxint_h__ */