VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.9.99.901+git20110131.be3be758/glxserver.h@ 36306

最後變更 在這個檔案從36306是 35847,由 vboxsync 提交於 14 年 前

Additions/x11/x11include: export header files for X.Org Server 1.10 pre-release to OSE

  • 屬性 svn:eol-style 設為 native
檔案大小: 7.1 KB
 
1#ifdef HAVE_DIX_CONFIG_H
2#include <dix-config.h>
3#endif
4
5#ifndef _GLX_server_h_
6#define _GLX_server_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
38#include <X11/X.h>
39#include <X11/Xproto.h>
40#include <X11/Xmd.h>
41#include <misc.h>
42#include <dixstruct.h>
43#include <pixmapstr.h>
44#include <gcstruct.h>
45#include <extnsionst.h>
46#include <resource.h>
47#include <scrnintstr.h>
48
49/*
50** The X header misc.h defines these math functions.
51*/
52#undef abs
53#undef fabs
54
55#define GL_GLEXT_PROTOTYPES /* we want prototypes */
56#include <GL/gl.h>
57#include <GL/glxproto.h>
58
59/*
60** GLX resources.
61*/
62typedef XID GLXContextID;
63typedef XID GLXPixmap;
64typedef XID GLXDrawable;
65
66typedef struct __GLXclientStateRec __GLXclientState;
67typedef struct __GLXdrawable __GLXdrawable;
68typedef struct __GLXcontext __GLXcontext;
69
70#include "glxscreens.h"
71#include "glxdrawable.h"
72#include "glxcontext.h"
73
74#ifndef True
75#define True 1
76#endif
77#ifndef False
78#define False 0
79#endif
80
81extern __GLXscreen *glxGetScreen(ScreenPtr pScreen);
82extern __GLXclientState *glxGetClient(ClientPtr pClient);
83
84/************************************************************************/
85
86void GlxExtensionInit(void);
87
88void GlxSetVisualConfigs(int nconfigs,
89 void *configs, void **privates);
90
91void __glXScreenInitVisuals(__GLXscreen *screen);
92
93/*
94** The last context used (from the server's persective) is cached.
95*/
96extern __GLXcontext *__glXLastContext;
97extern __GLXcontext *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*);
98
99extern ClientPtr __pGlxClient;
100
101int __glXError(int error);
102
103/*
104** Macros to set, unset, and retrieve the flag that says whether a context
105** has unflushed commands.
106*/
107#define __GLX_NOTE_UNFLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_TRUE
108#define __GLX_NOTE_FLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_FALSE
109#define __GLX_HAS_UNFLUSHED_CMDS(glxc) (glxc->hasUnflushedCommands)
110
111/************************************************************************/
112
113typedef struct __GLXprovider __GLXprovider;
114struct __GLXprovider {
115 __GLXscreen *(*screenProbe)(ScreenPtr pScreen);
116 const char *name;
117 __GLXprovider *next;
118};
119
120void GlxPushProvider(__GLXprovider *provider);
121
122enum {
123 GLX_MINIMAL_VISUALS,
124 GLX_TYPICAL_VISUALS,
125 GLX_ALL_VISUALS
126};
127
128void __glXsetEnterLeaveServerFuncs(void (*enter)(GLboolean),
129 void (*leave)(GLboolean));
130void __glXenterServer(GLboolean rendering);
131void __glXleaveServer(GLboolean rendering);
132
133void glxSuspendClients(void);
134void glxResumeClients(void);
135
136/*
137** State kept per client.
138*/
139struct __GLXclientStateRec {
140 /*
141 ** Whether this structure is currently being used to support a client.
142 */
143 Bool inUse;
144
145 /*
146 ** Buffer for returned data.
147 */
148 GLbyte *returnBuf;
149 GLint returnBufSize;
150
151 /*
152 ** Keep track of large rendering commands, which span multiple requests.
153 */
154 GLint largeCmdBytesSoFar; /* bytes received so far */
155 GLint largeCmdBytesTotal; /* total bytes expected */
156 GLint largeCmdRequestsSoFar; /* requests received so far */
157 GLint largeCmdRequestsTotal; /* total requests expected */
158 GLbyte *largeCmdBuf;
159 GLint largeCmdBufSize;
160
161 /*
162 ** Keep a list of all the contexts that are current for this client's
163 ** threads.
164 */
165 __GLXcontext **currentContexts;
166 GLint numCurrentContexts;
167
168 /* Back pointer to X client record */
169 ClientPtr client;
170
171 int GLClientmajorVersion;
172 int GLClientminorVersion;
173 char *GLClientextensions;
174};
175
176/************************************************************************/
177
178/*
179** Dispatch tables.
180*/
181typedef void (*__GLXdispatchRenderProcPtr)(GLbyte *);
182typedef int (*__GLXdispatchSingleProcPtr)(__GLXclientState *, GLbyte *);
183typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *);
184
185/*
186 * Dispatch for GLX commands.
187 */
188typedef int (*__GLXprocPtr)(__GLXclientState *, char *pc);
189
190/*
191 * Tables for computing the size of each rendering command.
192 */
193typedef int (*gl_proto_size_func)(const GLbyte *, Bool);
194
195typedef struct {
196 int bytes;
197 gl_proto_size_func varsize;
198} __GLXrenderSizeData;
199
200/************************************************************************/
201
202/*
203** X resources.
204*/
205extern RESTYPE __glXContextRes;
206extern RESTYPE __glXClientRes;
207extern RESTYPE __glXPixmapRes;
208extern RESTYPE __glXDrawableRes;
209
210/************************************************************************/
211
212/*
213** Prototypes.
214*/
215
216extern char *__glXcombine_strings(const char *, const char *);
217
218/*
219** Routines for sending swapped replies.
220*/
221
222extern void __glXSwapMakeCurrentReply(ClientPtr client,
223 xGLXMakeCurrentReply *reply);
224extern void __glXSwapIsDirectReply(ClientPtr client,
225 xGLXIsDirectReply *reply);
226extern void __glXSwapQueryVersionReply(ClientPtr client,
227 xGLXQueryVersionReply *reply);
228extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client,
229 xGLXQueryContextInfoEXTReply *reply,
230 int *buf);
231extern void __glXSwapGetDrawableAttributesReply(ClientPtr client,
232 xGLXGetDrawableAttributesReply *reply, CARD32 *buf);
233extern void glxSwapQueryExtensionsStringReply(ClientPtr client,
234 xGLXQueryExtensionsStringReply *reply, char *buf);
235extern void glxSwapQueryServerStringReply(ClientPtr client,
236 xGLXQueryServerStringReply *reply, char *buf);
237
238
239/*
240 * Routines for computing the size of variably-sized rendering commands.
241 */
242
243extern int __glXTypeSize(GLenum enm);
244extern int __glXImageSize(GLenum format, GLenum type,
245 GLenum target, GLsizei w, GLsizei h, GLsizei d,
246 GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows,
247 GLint alignment);
248
249extern unsigned glxMajorVersion;
250extern unsigned glxMinorVersion;
251
252extern int __glXEventBase;
253
254#endif /* !__GLX_server_h__ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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