github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/xcb/include/GL/glxint.h (about)

     1  #ifndef __GLX_glxint_h__
     2  #define __GLX_glxint_h__
     3  
     4  /*
     5   * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
     6   * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
     7   *
     8   * Permission is hereby granted, free of charge, to any person obtaining a
     9   * copy of this software and associated documentation files (the "Software"),
    10   * to deal in the Software without restriction, including without limitation
    11   * the rights to use, copy, modify, merge, publish, distribute, sublicense,
    12   * and/or sell copies of the Software, and to permit persons to whom the
    13   * Software is furnished to do so, subject to the following conditions:
    14   *
    15   * The above copyright notice including the dates of first publication and
    16   * either this permission notice or a reference to
    17   * http://oss.sgi.com/projects/FreeB/
    18   * shall be included in all copies or substantial portions of the Software.
    19   *
    20   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    21   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    22   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    23   * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    24   * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
    25   * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    26   * SOFTWARE.
    27   *
    28   * Except as contained in this notice, the name of Silicon Graphics, Inc.
    29   * shall not be used in advertising or otherwise to promote the sale, use or
    30   * other dealings in this Software without prior written authorization from
    31   * Silicon Graphics, Inc.
    32   */
    33  
    34  #include <X11/X.h>
    35  #include <X11/Xdefs.h>
    36  #include "GL/gl.h"
    37  
    38  typedef struct __GLXvisualConfigRec __GLXvisualConfig;
    39  typedef struct __GLXFBConfigRec __GLXFBConfig;
    40  
    41  struct __GLXvisualConfigRec {
    42      VisualID vid;
    43      int class;
    44      Bool rgba;
    45      int redSize, greenSize, blueSize, alphaSize;
    46      unsigned long redMask, greenMask, blueMask, alphaMask;
    47      int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize;
    48      Bool doubleBuffer;
    49      Bool stereo;
    50      int bufferSize;
    51      int depthSize;
    52      int stencilSize;
    53      int auxBuffers;
    54      int level;
    55      /* Start of Extended Visual Properties */
    56      int visualRating;		/* visual_rating extension */
    57      int transparentPixel;	/* visual_info extension */
    58  				/*    colors are floats scaled to ints */
    59      int transparentRed, transparentGreen, transparentBlue, transparentAlpha;
    60      int transparentIndex;
    61      int multiSampleSize;
    62      int nMultiSampleBuffers;
    63      int visualSelectGroup;
    64  };
    65  
    66  #define __GLX_MIN_CONFIG_PROPS	18
    67  #define __GLX_MAX_CONFIG_PROPS	500
    68  
    69  #define __GLX_EXT_CONFIG_PROPS 	10
    70  
    71  /*
    72  ** Since we send all non-core visual properties as token, value pairs,
    73  ** we require 2 words across the wire. In order to maintain backwards
    74  ** compatibility, we need to send the total number of words that the
    75  ** VisualConfigs are sent back in so old libraries can simply "ignore"
    76  ** the new properties.
    77  */
    78  #define __GLX_TOTAL_CONFIG       (__GLX_MIN_CONFIG_PROPS +      \
    79                                      2 * __GLX_EXT_CONFIG_PROPS)
    80  
    81  struct __GLXFBConfigRec {
    82      int visualType;
    83      int transparentType;
    84                                  /*    colors are floats scaled to ints */
    85      int transparentRed, transparentGreen, transparentBlue, transparentAlpha;
    86      int transparentIndex;
    87  
    88      int visualCaveat;
    89  
    90      int associatedVisualId;
    91      int screen;
    92  
    93      int drawableType;
    94      int renderType;
    95  
    96      int maxPbufferWidth, maxPbufferHeight, maxPbufferPixels;
    97      int optimalPbufferWidth, optimalPbufferHeight;  /* for SGIX_pbuffer */
    98  
    99      int visualSelectGroup;	/* visuals grouped by select priority */
   100  
   101      unsigned int id;
   102  
   103      GLboolean rgbMode;
   104      GLboolean colorIndexMode;
   105      GLboolean doubleBufferMode;
   106      GLboolean stereoMode;
   107      GLboolean haveAccumBuffer;
   108      GLboolean haveDepthBuffer;
   109      GLboolean haveStencilBuffer;
   110  
   111      /* The number of bits present in various buffers */
   112      GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
   113      GLint depthBits;
   114      GLint stencilBits;
   115      GLint indexBits;
   116      GLint redBits, greenBits, blueBits, alphaBits;
   117      GLuint redMask, greenMask, blueMask, alphaMask;
   118  
   119      GLuint multiSampleSize;     /* Number of samples per pixel (0 if no ms) */
   120  
   121      GLuint nMultiSampleBuffers; /* Number of available ms buffers */
   122      GLint maxAuxBuffers;
   123  
   124      /* frame buffer level */
   125      GLint level;
   126  
   127      /* color ranges (for SGI_color_range) */
   128      GLboolean extendedRange;
   129      GLdouble minRed, maxRed;
   130      GLdouble minGreen, maxGreen;
   131      GLdouble minBlue, maxBlue;
   132      GLdouble minAlpha, maxAlpha;
   133  };
   134  
   135  #define __GLX_TOTAL_FBCONFIG_PROPS	 35
   136  
   137  #endif /* !__GLX_glxint_h__ */