VirtualBox

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

Last change on this file since 99743 was 17471, checked in by vboxsync, 16 years ago

export to OSE

  • Property svn:eol-style set to native
File size: 5.6 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** License Applicability. Except to the extent portions of this file are
10** made subject to an alternative license as permitted in the SGI Free
11** Software License B, Version 1.1 (the "License"), the contents of this
12** file are subject only to the provisions of the License. You may not use
13** this file except in compliance with the License. You may obtain a copy
14** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
15** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
16**
17** http://oss.sgi.com/projects/FreeB
18**
19** Note that, as provided in the License, the Software is distributed on an
20** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
21** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
23** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
24**
25** Original Code. The Original Code is: OpenGL Sample Implementation,
26** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
27** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
28** Copyright in any portions created by third parties is as indicated
29** elsewhere herein. All Rights Reserved.
30**
31** Additional Notice Provisions: The application programming interfaces
32** established by SGI in conjunction with the Original Code are The
33** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
34** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
35** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
36** Window System(R) (Version 1.3), released October 19, 1998. This software
37** was created using the OpenGL(R) version 1.2.1 Sample Implementation
38** published by SGI, but has not been independently verified as being
39** compliant with the OpenGL(R) version 1.2.1 Specification.
40**
41*/
42
43typedef struct {
44 void * (* queryHyperpipeNetworkFunc)(int, int *, int *);
45 void * (* queryHyperpipeConfigFunc)(int, int, int *, int *);
46 int (* destroyHyperpipeConfigFunc)(int, int);
47 void * (* hyperpipeConfigFunc)(int, int, int *, int *, void *);
48} __GLXHyperpipeExtensionFuncs;
49
50typedef struct {
51 int (* bindSwapBarrierFunc)(int, XID, int);
52 int (* queryMaxSwapBarriersFunc)(int);
53} __GLXSwapBarrierExtensionFuncs;
54
55void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs);
56void __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs);
57
58typedef struct __GLXconfig __GLXconfig;
59struct __GLXconfig {
60 __GLXconfig *next;
61 GLuint doubleBufferMode;
62 GLuint stereoMode;
63
64 GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
65 GLuint redMask, greenMask, blueMask, alphaMask;
66 GLint rgbBits; /* total bits for rgb */
67 GLint indexBits; /* total bits for colorindex */
68
69 GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
70 GLint depthBits;
71 GLint stencilBits;
72
73 GLint numAuxBuffers;
74
75 GLint level;
76
77 GLint pixmapMode;
78
79 /* GLX */
80 GLint visualID;
81 GLint visualType; /**< One of the GLX X visual types. (i.e.,
82 * \c GLX_TRUE_COLOR, etc.)
83 */
84
85 /* EXT_visual_rating / GLX 1.2 */
86 GLint visualRating;
87
88 /* EXT_visual_info / GLX 1.2 */
89 GLint transparentPixel;
90 /* colors are floats scaled to ints */
91 GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
92 GLint transparentIndex;
93
94 /* ARB_multisample / SGIS_multisample */
95 GLint sampleBuffers;
96 GLint samples;
97
98 /* SGIX_fbconfig / GLX 1.3 */
99 GLint drawableType;
100 GLint renderType;
101 GLint xRenderable;
102 GLint fbconfigID;
103
104 /* SGIX_pbuffer / GLX 1.3 */
105 GLint maxPbufferWidth;
106 GLint maxPbufferHeight;
107 GLint maxPbufferPixels;
108 GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
109 GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
110
111 /* SGIX_visual_select_group */
112 GLint visualSelectGroup;
113
114 /* OML_swap_method */
115 GLint swapMethod;
116
117 GLint screen;
118
119 /* EXT_texture_from_pixmap */
120 GLint bindToTextureRgb;
121 GLint bindToTextureRgba;
122 GLint bindToMipmapTexture;
123 GLint bindToTextureTargets;
124 GLint yInverted;
125};
126
127GLint glxConvertToXVisualType(int visualType);
128
129/*
130** Screen dependent data. These methods are the interface between the DIX
131** and DDX layers of the GLX server extension. The methods provide an
132** interface for context management on a screen.
133*/
134typedef struct __GLXscreen __GLXscreen;
135struct __GLXscreen {
136 void (*destroy) (__GLXscreen *screen);
137
138 __GLXcontext *(*createContext) (__GLXscreen *screen,
139 __GLXconfig *modes,
140 __GLXcontext *shareContext);
141
142 __GLXdrawable *(*createDrawable)(__GLXscreen *context,
143 DrawablePtr pDraw,
144 int type,
145 XID drawId,
146 __GLXconfig *modes);
147 int (*swapInterval) (__GLXdrawable *drawable,
148 int interval);
149
150 __GLXHyperpipeExtensionFuncs *hyperpipeFuncs;
151 __GLXSwapBarrierExtensionFuncs *swapBarrierFuncs;
152
153 ScreenPtr pScreen;
154
155 /* Linked list of valid fbconfigs for this screen. */
156 __GLXconfig *fbconfigs;
157 int numFBConfigs;
158
159 /* Subset of fbconfigs that are exposed as GLX visuals. */
160 __GLXconfig **visuals;
161 GLint numVisuals;
162
163 char *GLextensions;
164
165 char *GLXvendor;
166 char *GLXversion;
167 char *GLXextensions;
168
169 Bool (*PositionWindow)(WindowPtr pWin, int x, int y);
170 Bool (*CloseScreen)(int index, ScreenPtr pScreen);
171};
172
173
174void __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen);
175void __glXScreenDestroy(__GLXscreen *screen);
176
177#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