VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.16.0/glxscreens.h@ 87454

Last change on this file since 87454 was 52145, checked in by vboxsync, 10 years ago

Additions/x11/x11include: add header files for X.Org Server 1.16.

  • Property svn:eol-style set to native
File size: 5.3 KB
Line 
1#ifdef HAVE_DIX_CONFIG_H
2#include <dix-config.h>
3#endif
4
5#ifndef _GLX_screens_h_
6#define _GLX_screens_h_
7
8/*
9 * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
10 * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
11 *
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:
18 *
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.
23 *
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
30 * SOFTWARE.
31 *
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.
36 */
37
38typedef struct __GLXconfig __GLXconfig;
39struct __GLXconfig {
40 __GLXconfig *next;
41 GLuint doubleBufferMode;
42 GLuint stereoMode;
43
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 */
48
49 GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
50 GLint depthBits;
51 GLint stencilBits;
52
53 GLint numAuxBuffers;
54
55 GLint level;
56
57 /* GLX */
58 GLint visualID;
59 GLint visualType; /**< One of the GLX X visual types. (i.e.,
60 * \c GLX_TRUE_COLOR, etc.)
61 */
62
63 /* EXT_visual_rating / GLX 1.2 */
64 GLint visualRating;
65
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;
71
72 /* ARB_multisample / SGIS_multisample */
73 GLint sampleBuffers;
74 GLint samples;
75
76 /* SGIX_fbconfig / GLX 1.3 */
77 GLint drawableType;
78 GLint renderType;
79 GLint xRenderable;
80 GLint fbconfigID;
81
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. */
88
89 /* SGIX_visual_select_group */
90 GLint visualSelectGroup;
91
92 /* OML_swap_method */
93 GLint swapMethod;
94
95 /* EXT_texture_from_pixmap */
96 GLint bindToTextureRgb;
97 GLint bindToTextureRgba;
98 GLint bindToMipmapTexture;
99 GLint bindToTextureTargets;
100 GLint yInverted;
101
102 /* ARB_framebuffer_sRGB */
103 GLint sRGBCapable;
104};
105
106GLint glxConvertToXVisualType(int visualType);
107
108/*
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.
112*/
113typedef struct __GLXscreen __GLXscreen;
114struct __GLXscreen {
115 void (*destroy) (__GLXscreen * screen);
116
117 __GLXcontext *(*createContext) (__GLXscreen * screen,
118 __GLXconfig * modes,
119 __GLXcontext * shareContext,
120 unsigned num_attribs,
121 const uint32_t *attribs,
122 int *error);
123
124 __GLXdrawable *(*createDrawable) (ClientPtr client,
125 __GLXscreen * context,
126 DrawablePtr pDraw,
127 XID drawId,
128 int type,
129 XID glxDrawId, __GLXconfig * modes);
130 int (*swapInterval) (__GLXdrawable * drawable, int interval);
131
132 ScreenPtr pScreen;
133
134 /* Linked list of valid fbconfigs for this screen. */
135 __GLXconfig *fbconfigs;
136 int numFBConfigs;
137
138 /* Subset of fbconfigs that are exposed as GLX visuals. */
139 __GLXconfig **visuals;
140 GLint numVisuals;
141
142 char *GLextensions;
143
144 char *GLXextensions;
145
146 /**
147 * \name GLX version supported by this screen.
148 *
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.
151 */
152 /*@{ */
153 unsigned GLXmajor;
154 unsigned GLXminor;
155 /*@} */
156
157 Bool (*CloseScreen) (ScreenPtr pScreen);
158};
159
160void __glXScreenInit(__GLXscreen * screen, ScreenPtr pScreen);
161void __glXScreenDestroy(__GLXscreen * screen);
162
163#endif /* !__GLX_screens_h__ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette