| 1 |
#ifndef __GLX_glxint_h__ |
| 2 |
#define __GLX_glxint_h__ |
| 3 |
|
| 4 |
/* |
| 5 |
** The contents of this file are subject to the GLX Public License Version 1.0 |
| 6 |
** (the "License"). You may not use this file except in compliance with the |
| 7 |
** License. You may obtain a copy of the License at Silicon Graphics, Inc., |
| 8 |
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 |
| 9 |
** or at http://www.sgi.com/software/opensource/glx/license.html. |
| 10 |
** |
| 11 |
** Software distributed under the License is distributed on an "AS IS" |
| 12 |
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY |
| 13 |
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR |
| 14 |
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific |
| 15 |
** language governing rights and limitations under the License. |
| 16 |
** |
| 17 |
** The Original Software is GLX version 1.2 source code, released February, |
| 18 |
** 1999. The developer of the Original Software is Silicon Graphics, Inc. |
| 19 |
** Those portions of the Subject Software created by Silicon Graphics, Inc. |
| 20 |
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. |
| 21 |
** |
| 22 |
** $SGI$ |
| 23 |
*/ |
| 24 |
|
| 25 |
#include <nx-X11/X.h> |
| 26 |
#include <nx-X11/Xdefs.h> |
| 27 |
#include "GL/gl.h" |
| 28 |
|
| 29 |
typedef struct __GLXvisualConfigRec __GLXvisualConfig; |
| 30 |
typedef struct __GLXFBConfigRec __GLXFBConfig; |
| 31 |
|
| 32 |
struct __GLXvisualConfigRec { |
| 33 |
VisualID vid; |
| 34 |
int class; |
| 35 |
Bool rgba; |
| 36 |
int redSize, greenSize, blueSize, alphaSize; |
| 37 |
unsigned long redMask, greenMask, blueMask, alphaMask; |
| 38 |
int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize; |
| 39 |
Bool doubleBuffer; |
| 40 |
Bool stereo; |
| 41 |
int bufferSize; |
| 42 |
int depthSize; |
| 43 |
int stencilSize; |
| 44 |
int auxBuffers; |
| 45 |
int level; |
| 46 |
/* Start of Extended Visual Properties */ |
| 47 |
int visualRating; /* visual_rating extension */ |
| 48 |
int transparentPixel; /* visual_info extension */ |
| 49 |
/* colors are floats scaled to ints */ |
| 50 |
int transparentRed, transparentGreen, transparentBlue, transparentAlpha; |
| 51 |
int transparentIndex; |
| 52 |
int multiSampleSize; |
| 53 |
int nMultiSampleBuffers; |
| 54 |
int visualSelectGroup; |
| 55 |
}; |
| 56 |
|
| 57 |
#define __GLX_MIN_CONFIG_PROPS 18 |
| 58 |
#define __GLX_MAX_CONFIG_PROPS 500 |
| 59 |
|
| 60 |
#define __GLX_EXT_CONFIG_PROPS 10 |
| 61 |
|
| 62 |
/* |
| 63 |
** Since we send all non-core visual properties as token, value pairs, |
| 64 |
** we require 2 words across the wire. In order to maintain backwards |
| 65 |
** compatibility, we need to send the total number of words that the |
| 66 |
** VisualConfigs are sent back in so old libraries can simply "ignore" |
| 67 |
** the new properties. |
| 68 |
*/ |
| 69 |
#define __GLX_TOTAL_CONFIG (__GLX_MIN_CONFIG_PROPS + \ |
| 70 |
2 * __GLX_EXT_CONFIG_PROPS) |
| 71 |
|
| 72 |
struct __GLXFBConfigRec { |
| 73 |
int visualType; |
| 74 |
int transparentType; |
| 75 |
/* colors are floats scaled to ints */ |
| 76 |
int transparentRed, transparentGreen, transparentBlue, transparentAlpha; |
| 77 |
int transparentIndex; |
| 78 |
|
| 79 |
int visualCaveat; |
| 80 |
|
| 81 |
int associatedVisualId; |
| 82 |
int screen; |
| 83 |
|
| 84 |
int drawableType; |
| 85 |
int renderType; |
| 86 |
|
| 87 |
int maxPbufferWidth, maxPbufferHeight, maxPbufferPixels; |
| 88 |
int optimalPbufferWidth, optimalPbufferHeight; /* for SGIX_pbuffer */ |
| 89 |
|
| 90 |
int visualSelectGroup; /* visuals grouped by select priority */ |
| 91 |
|
| 92 |
unsigned int id; |
| 93 |
|
| 94 |
GLboolean rgbMode; |
| 95 |
GLboolean colorIndexMode; |
| 96 |
GLboolean doubleBufferMode; |
| 97 |
GLboolean stereoMode; |
| 98 |
GLboolean haveAccumBuffer; |
| 99 |
GLboolean haveDepthBuffer; |
| 100 |
GLboolean haveStencilBuffer; |
| 101 |
|
| 102 |
/* The number of bits present in various buffers */ |
| 103 |
GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; |
| 104 |
GLint depthBits; |
| 105 |
GLint stencilBits; |
| 106 |
GLint indexBits; |
| 107 |
GLint redBits, greenBits, blueBits, alphaBits; |
| 108 |
GLuint redMask, greenMask, blueMask, alphaMask; |
| 109 |
|
| 110 |
GLuint multiSampleSize; /* Number of samples per pixel (0 if no ms) */ |
| 111 |
|
| 112 |
GLuint nMultiSampleBuffers; /* Number of availble ms buffers */ |
| 113 |
GLint maxAuxBuffers; |
| 114 |
|
| 115 |
/* frame buffer level */ |
| 116 |
GLint level; |
| 117 |
|
| 118 |
/* color ranges (for SGI_color_range) */ |
| 119 |
GLboolean extendedRange; |
| 120 |
GLdouble minRed, maxRed; |
| 121 |
GLdouble minGreen, maxGreen; |
| 122 |
GLdouble minBlue, maxBlue; |
| 123 |
GLdouble minAlpha, maxAlpha; |
| 124 |
}; |
| 125 |
|
| 126 |
#define __GLX_TOTAL_FBCONFIG_PROPS 35 |
| 127 |
|
| 128 |
#endif /* !__GLX_glxint_h__ */ |