5 ** License Applicability. Except to the extent portions of this file are
6 ** made subject to an alternative license as permitted in the SGI Free
7 ** Software License B, Version 1.1 (the "License"), the contents of this
8 ** file are subject only to the provisions of the License. You may not use
9 ** this file except in compliance with the License. You may obtain a copy
10 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
11 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
13 ** http://oss.sgi.com/projects/FreeB
15 ** Note that, as provided in the License, the Software is distributed on an
16 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
17 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
18 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
19 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
21 ** Original Code. The Original Code is: OpenGL Sample Implementation,
22 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
23 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
24 ** Copyright in any portions created by third parties is as indicated
25 ** elsewhere herein. All Rights Reserved.
27 ** Additional Notice Provisions: The application programming interfaces
28 ** established by SGI in conjunction with the Original Code are The
29 ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
30 ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
31 ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
32 ** Window System(R) (Version 1.3), released October 19, 1998. This software
33 ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
34 ** published by SGI, but has not been independently verified as being
35 ** compliant with the OpenGL(R) version 1.2.1 Specification.
39 #include <sys/types.h>
42 #define GL_CORE_MESA 2
43 #define GL_CORE_APPLE 4
44 #define GL_CORE_WINDOWS 8
46 typedef struct __GLcontextRec __GLcontext
;
49 ** This file defines the interface between the GL core and the surrounding
50 ** "operating system" that supports it (currently the GLX or WGL extensions).
52 ** Members (data and function pointers) are documented as imported or
53 ** exported according to how they are used by the core rendering functions.
54 ** Imported members are initialized by the "operating system" and used by
55 ** the core functions. Exported members are initialized by the core functions
56 ** and used by the "operating system".
60 * Mode and limit information for a context. This information is
61 * kept around in the context so that values can be used during
62 * command execution, and for returning information about the
63 * context to the application.
65 * Instances of this structure are shared by the driver and the loader. To
66 * maintain binary compatability, new fields \b must be added only to the
67 * end of the structure.
69 * \sa _gl_context_modes_create
71 typedef struct __GLcontextModesRec
{
72 struct __GLcontextModesRec
* next
;
76 GLboolean colorIndexMode
;
77 GLuint doubleBufferMode
;
80 GLboolean haveAccumBuffer
;
81 GLboolean haveDepthBuffer
;
82 GLboolean haveStencilBuffer
;
84 GLint redBits
, greenBits
, blueBits
, alphaBits
; /* bits per comp */
85 GLuint redMask
, greenMask
, blueMask
, alphaMask
;
86 GLint rgbBits
; /* total bits for rgb */
87 GLint indexBits
; /* total bits for colorindex */
89 GLint accumRedBits
, accumGreenBits
, accumBlueBits
, accumAlphaBits
;
101 GLint visualType
; /**< One of the GLX X visual types. (i.e.,
102 * \c GLX_TRUE_COLOR, etc.)
105 /* EXT_visual_rating / GLX 1.2 */
108 /* EXT_visual_info / GLX 1.2 */
109 GLint transparentPixel
;
110 /* colors are floats scaled to ints */
111 GLint transparentRed
, transparentGreen
, transparentBlue
, transparentAlpha
;
112 GLint transparentIndex
;
114 /* ARB_multisample / SGIS_multisample */
118 /* SGIX_fbconfig / GLX 1.3 */
124 /* SGIX_pbuffer / GLX 1.3 */
125 GLint maxPbufferWidth
;
126 GLint maxPbufferHeight
;
127 GLint maxPbufferPixels
;
128 GLint optimalPbufferWidth
; /* Only for SGIX_pbuffer. */
129 GLint optimalPbufferHeight
; /* Only for SGIX_pbuffer. */
131 /* SGIX_visual_select_group */
132 GLint visualSelectGroup
;
134 /* OML_swap_method */
139 /* EXT_texture_from_pixmap */
140 GLint bindToTextureRgb
;
141 GLint bindToTextureRgba
;
142 GLint bindToMipmapTexture
;
143 GLint bindToTextureTargets
;
147 /* Several fields of __GLcontextModes can take these as values. Since
148 * GLX header files may not be available everywhere they need to be used,
149 * redefine them here.
151 #define GLX_NONE 0x8000
152 #define GLX_SLOW_CONFIG 0x8001
153 #define GLX_TRUE_COLOR 0x8002
154 #define GLX_DIRECT_COLOR 0x8003
155 #define GLX_PSEUDO_COLOR 0x8004
156 #define GLX_STATIC_COLOR 0x8005
157 #define GLX_GRAY_SCALE 0x8006
158 #define GLX_STATIC_GRAY 0x8007
159 #define GLX_TRANSPARENT_RGB 0x8008
160 #define GLX_TRANSPARENT_INDEX 0x8009
161 #define GLX_NON_CONFORMANT_CONFIG 0x800D
162 #define GLX_SWAP_EXCHANGE_OML 0x8061
163 #define GLX_SWAP_COPY_OML 0x8062
164 #define GLX_SWAP_UNDEFINED_OML 0x8063
166 #define GLX_DONT_CARE 0xFFFFFFFF
168 #define GLX_RGBA_BIT 0x00000001
169 #define GLX_COLOR_INDEX_BIT 0x00000002
170 #define GLX_WINDOW_BIT 0x00000001
171 #define GLX_PIXMAP_BIT 0x00000002
172 #define GLX_PBUFFER_BIT 0x00000004
174 #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
175 #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
176 #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
177 #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
178 #define GLX_Y_INVERTED_EXT 0x20D4
180 #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
181 #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
182 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
184 #endif /* __gl_core_h_ */