1 #ifdef HAVE_DIX_CONFIG_H
2 #include <dix-config.h>
5 #ifndef _GLX_screens_h_
6 #define _GLX_screens_h_
9 * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
10 * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice including the dates of first publication and
20 * either this permission notice or a reference to
21 * http://oss.sgi.com/projects/FreeB/
22 * shall be included in all copies or substantial portions of the Software.
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
28 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
29 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32 * Except as contained in this notice, the name of Silicon Graphics, Inc.
33 * shall not be used in advertising or otherwise to promote the sale, use or
34 * other dealings in this Software without prior written authorization from
35 * Silicon Graphics, Inc.
38 typedef struct __GLXconfig __GLXconfig
;
41 GLuint doubleBufferMode
;
44 GLint redBits
, greenBits
, blueBits
, alphaBits
; /* bits per comp */
45 GLuint redMask
, greenMask
, blueMask
, alphaMask
;
46 GLint rgbBits
; /* total bits for rgb */
47 GLint indexBits
; /* total bits for colorindex */
49 GLint accumRedBits
, accumGreenBits
, accumBlueBits
, accumAlphaBits
;
59 GLint visualType
; /**< One of the GLX X visual types. (i.e.,
60 * \c GLX_TRUE_COLOR, etc.)
63 /* EXT_visual_rating / GLX 1.2 */
66 /* EXT_visual_info / GLX 1.2 */
67 GLint transparentPixel
;
68 /* colors are floats scaled to ints */
69 GLint transparentRed
, transparentGreen
, transparentBlue
, transparentAlpha
;
70 GLint transparentIndex
;
72 /* ARB_multisample / SGIS_multisample */
76 /* SGIX_fbconfig / GLX 1.3 */
82 /* SGIX_pbuffer / GLX 1.3 */
83 GLint maxPbufferWidth
;
84 GLint maxPbufferHeight
;
85 GLint maxPbufferPixels
;
86 GLint optimalPbufferWidth
; /* Only for SGIX_pbuffer. */
87 GLint optimalPbufferHeight
; /* Only for SGIX_pbuffer. */
89 /* SGIX_visual_select_group */
90 GLint visualSelectGroup
;
95 /* EXT_texture_from_pixmap */
96 GLint bindToTextureRgb
;
97 GLint bindToTextureRgba
;
98 GLint bindToMipmapTexture
;
99 GLint bindToTextureTargets
;
102 /* ARB_framebuffer_sRGB */
106 GLint
glxConvertToXVisualType(int visualType
);
109 ** Screen dependent data. These methods are the interface between the DIX
110 ** and DDX layers of the GLX server extension. The methods provide an
111 ** interface for context management on a screen.
113 typedef struct __GLXscreen __GLXscreen
;
115 void (*destroy
) (__GLXscreen
* screen
);
117 __GLXcontext
*(*createContext
) (__GLXscreen
* screen
,
119 __GLXcontext
* shareContext
,
120 unsigned num_attribs
,
121 const uint32_t *attribs
,
124 __GLXdrawable
*(*createDrawable
) (ClientPtr client
,
125 __GLXscreen
* context
,
129 XID glxDrawId
, __GLXconfig
* modes
);
130 int (*swapInterval
) (__GLXdrawable
* drawable
, int interval
);
134 /* Linked list of valid fbconfigs for this screen. */
135 __GLXconfig
*fbconfigs
;
138 /* Subset of fbconfigs that are exposed as GLX visuals. */
139 __GLXconfig
**visuals
;
147 * \name GLX version supported by this screen.
149 * Since the GLX version advertised by the server is for the whole server,
150 * the GLX protocol code uses the minimum version supported on all screens.
157 Bool (*CloseScreen
) (ScreenPtr pScreen
);
160 void __glXScreenInit(__GLXscreen
* screen
, ScreenPtr pScreen
);
161 void __glXScreenDestroy(__GLXscreen
* screen
);
163 #endif /* !__GLX_screens_h__ */