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.
39 void * (* queryHyperpipeNetworkFunc)(int, int *, int *);
40 void * (* queryHyperpipeConfigFunc)(int, int, int *, int *);
41 int (* destroyHyperpipeConfigFunc)(int, int);
42 void * (* hyperpipeConfigFunc)(int, int, int *, int *, void *);
43 } __GLXHyperpipeExtensionFuncs;
46 int (* bindSwapBarrierFunc)(int, XID, int);
47 int (* queryMaxSwapBarriersFunc)(int);
48 } __GLXSwapBarrierExtensionFuncs;
50 void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs);
51 void __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs);
53 typedef struct __GLXconfig __GLXconfig;
56 GLuint doubleBufferMode;
59 GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
60 GLuint redMask, greenMask, blueMask, alphaMask;
61 GLint rgbBits; /* total bits for rgb */
62 GLint indexBits; /* total bits for colorindex */
64 GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
76 GLint visualType; /**< One of the GLX X visual types. (i.e.,
77 * \c GLX_TRUE_COLOR, etc.)
80 /* EXT_visual_rating / GLX 1.2 */
83 /* EXT_visual_info / GLX 1.2 */
84 GLint transparentPixel;
85 /* colors are floats scaled to ints */
86 GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
87 GLint transparentIndex;
89 /* ARB_multisample / SGIS_multisample */
93 /* SGIX_fbconfig / GLX 1.3 */
99 /* SGIX_pbuffer / GLX 1.3 */
100 GLint maxPbufferWidth;
101 GLint maxPbufferHeight;
102 GLint maxPbufferPixels;
103 GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
104 GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
106 /* SGIX_visual_select_group */
107 GLint visualSelectGroup;
109 /* OML_swap_method */
114 /* EXT_texture_from_pixmap */
115 GLint bindToTextureRgb;
116 GLint bindToTextureRgba;
117 GLint bindToMipmapTexture;
118 GLint bindToTextureTargets;
122 GLint glxConvertToXVisualType(int visualType);
125 ** Screen dependent data. These methods are the interface between the DIX
126 ** and DDX layers of the GLX server extension. The methods provide an
127 ** interface for context management on a screen.
129 typedef struct __GLXscreen __GLXscreen;
131 void (*destroy) (__GLXscreen *screen);
133 __GLXcontext *(*createContext) (__GLXscreen *screen,
135 __GLXcontext *shareContext);
137 __GLXdrawable *(*createDrawable)(ClientPtr client,
138 __GLXscreen *context,
144 int (*swapInterval) (__GLXdrawable *drawable,
147 __GLXHyperpipeExtensionFuncs *hyperpipeFuncs;
148 __GLXSwapBarrierExtensionFuncs *swapBarrierFuncs;
152 /* Linked list of valid fbconfigs for this screen. */
153 __GLXconfig *fbconfigs;
156 /* Subset of fbconfigs that are exposed as GLX visuals. */
157 __GLXconfig **visuals;
167 * \name GLX version supported by this screen.
169 * Since the GLX version advertised by the server is for the whole server,
170 * the GLX protocol code uses the minimum version supported on all screens.
177 Bool (*CloseScreen)(int index, ScreenPtr pScreen);
181 void __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen);
182 void __glXScreenDestroy(__GLXscreen *screen);
184 #endif /* !__GLX_screens_h__ */