1f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#ifndef __gl_core_h_ 2f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define __gl_core_h_ 3f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 4f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/* 5f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) 6f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. 7f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 8f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Permission is hereby granted, free of charge, to any person obtaining a 9f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * copy of this software and associated documentation files (the "Software"), 10f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * to deal in the Software without restriction, including without limitation 11f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * and/or sell copies of the Software, and to permit persons to whom the 13f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Software is furnished to do so, subject to the following conditions: 14f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 15f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * The above copyright notice including the dates of first publication and 16f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * either this permission notice or a reference to 17f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * http://oss.sgi.com/projects/FreeB/ 18f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * shall be included in all copies or substantial portions of the Software. 19f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 20f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 25f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * SOFTWARE. 27f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 28f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Except as contained in this notice, the name of Silicon Graphics, Inc. 29f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * shall not be used in advertising or otherwise to promote the sale, use or 30f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * other dealings in this Software without prior written authorization from 31f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Silicon Graphics, Inc. 32f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 33f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 34f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#if !defined(_WIN32_WCE) 35f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include <sys/types.h> 36f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#endif 37f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 38f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GL_CORE_SGI 1 39f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GL_CORE_MESA 2 40f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GL_CORE_APPLE 4 41f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GL_CORE_WINDOWS 8 42f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 43f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgtypedef struct __GLcontextRec __GLcontext; 44f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 45f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/* 46f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org** This file defines the interface between the GL core and the surrounding 47f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org** "operating system" that supports it (currently the GLX or WGL extensions). 48f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org** 49f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org** Members (data and function pointers) are documented as imported or 50f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org** exported according to how they are used by the core rendering functions. 51f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org** Imported members are initialized by the "operating system" and used by 52f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org** the core functions. Exported members are initialized by the core functions 53f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org** and used by the "operating system". 54f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org*/ 55f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 56f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/** 57f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Mode and limit information for a context. This information is 58f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * kept around in the context so that values can be used during 59f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * command execution, and for returning information about the 60f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * context to the application. 61f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 62f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Instances of this structure are shared by the driver and the loader. To 63f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * maintain binary compatability, new fields \b must be added only to the 64f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * end of the structure. 65f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 66f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \sa _gl_context_modes_create 67f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 68f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgtypedef struct __GLcontextModesRec { 69f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct __GLcontextModesRec * next; 70f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 71f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLboolean rgbMode; 72f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLboolean floatMode; 73f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLboolean colorIndexMode; 74f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLuint doubleBufferMode; 75f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLuint stereoMode; 76f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 77f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLboolean haveAccumBuffer; 78f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLboolean haveDepthBuffer; 79f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLboolean haveStencilBuffer; 80f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 81f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ 82f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLuint redMask, greenMask, blueMask, alphaMask; 83f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint rgbBits; /* total bits for rgb */ 84f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint indexBits; /* total bits for colorindex */ 85f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 86f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; 87f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint depthBits; 88f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint stencilBits; 89f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 90f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint numAuxBuffers; 91f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 92f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint level; 93f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 94f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint pixmapMode; 95f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 96f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* GLX */ 97f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint visualID; 98f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint visualType; /**< One of the GLX X visual types. (i.e., 99f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \c GLX_TRUE_COLOR, etc.) 100f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 101f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 102f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* EXT_visual_rating / GLX 1.2 */ 103f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint visualRating; 104f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 105f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* EXT_visual_info / GLX 1.2 */ 106f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint transparentPixel; 107f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* colors are floats scaled to ints */ 108f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; 109f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint transparentIndex; 110f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 111f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* ARB_multisample / SGIS_multisample */ 112f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint sampleBuffers; 113f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint samples; 114f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 115f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* SGIX_fbconfig / GLX 1.3 */ 116f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint drawableType; 117f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint renderType; 118f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint xRenderable; 119f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint fbconfigID; 120f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 121f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* SGIX_pbuffer / GLX 1.3 */ 122f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint maxPbufferWidth; 123f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint maxPbufferHeight; 124f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint maxPbufferPixels; 125f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ 126f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ 127f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 128f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* SGIX_visual_select_group */ 129f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint visualSelectGroup; 130f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 131f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* OML_swap_method */ 132f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint swapMethod; 133f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 134f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint screen; 135f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 136f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* EXT_texture_from_pixmap */ 137f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint bindToTextureRgb; 138f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint bindToTextureRgba; 139f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint bindToMipmapTexture; 140f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint bindToTextureTargets; 141f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint yInverted; 142f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org} __GLcontextModes; 143f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 144f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/* Several fields of __GLcontextModes can take these as values. Since 145f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * GLX header files may not be available everywhere they need to be used, 146f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * redefine them here. 147f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 148f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_NONE 0x8000 149f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_SLOW_CONFIG 0x8001 150f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_TRUE_COLOR 0x8002 151f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_DIRECT_COLOR 0x8003 152f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_PSEUDO_COLOR 0x8004 153f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_STATIC_COLOR 0x8005 154f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_GRAY_SCALE 0x8006 155f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_STATIC_GRAY 0x8007 156f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_TRANSPARENT_RGB 0x8008 157f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_TRANSPARENT_INDEX 0x8009 158f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_NON_CONFORMANT_CONFIG 0x800D 159f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_SWAP_EXCHANGE_OML 0x8061 160f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_SWAP_COPY_OML 0x8062 161f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_SWAP_UNDEFINED_OML 0x8063 162f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 163f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_DONT_CARE 0xFFFFFFFF 164f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 165f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_RGBA_BIT 0x00000001 166f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_COLOR_INDEX_BIT 0x00000002 167f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_WINDOW_BIT 0x00000001 168f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_PIXMAP_BIT 0x00000002 169f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_PBUFFER_BIT 0x00000004 170f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 171f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 172f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 173f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 174f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 175f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_Y_INVERTED_EXT 0x20D4 176f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 177f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 178f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 179f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 180f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 181f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#endif /* __gl_core_h_ */ 182