VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.14.0/glxserver.h

最後變更 在這個檔案是 45134,由 vboxsync 提交於 12 年 前

Additions/X11: build vboxvideo_drv.so for X.Org Server 1.14.

  • 屬性 svn:eol-style 設為 native
檔案大小: 7.0 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#include <GL/gl.h>
50#include <GL/glxproto.h>
51
52/*
53** GLX resources.
54*/
55typedef XID GLXContextID;
56typedef XID GLXPixmap;
57typedef XID GLXDrawable;
58
59typedef struct __GLXclientStateRec __GLXclientState;
60typedef struct __GLXdrawable __GLXdrawable;
61typedef struct __GLXcontext __GLXcontext;
62
63#include "glxscreens.h"
64#include "glxdrawable.h"
65#include "glxcontext.h"
66
67#ifndef True
68#define True 1
69#endif
70#ifndef False
71#define False 0
72#endif
73
74extern __GLXscreen *glxGetScreen(ScreenPtr pScreen);
75extern __GLXclientState *glxGetClient(ClientPtr pClient);
76
77/************************************************************************/
78
79void GlxSetVisualConfigs(int nconfigs, void *configs, void **privates);
80
81void __glXScreenInitVisuals(__GLXscreen * screen);
82
83/*
84** The last context used (from the server's persective) is cached.
85*/
86extern __GLXcontext *__glXLastContext;
87extern __GLXcontext *__glXForceCurrent(__GLXclientState *, GLXContextTag,
88 int *);
89
90int __glXError(int error);
91
92/************************************************************************/
93
94typedef struct __GLXprovider __GLXprovider;
95struct __GLXprovider {
96 __GLXscreen *(*screenProbe) (ScreenPtr pScreen);
97 const char *name;
98 __GLXprovider *next;
99};
100extern __GLXprovider __glXDRISWRastProvider;
101
102void GlxPushProvider(__GLXprovider * provider);
103
104enum {
105 GLX_MINIMAL_VISUALS,
106 GLX_TYPICAL_VISUALS,
107 GLX_ALL_VISUALS
108};
109
110void __glXsetEnterLeaveServerFuncs(void (*enter) (GLboolean),
111 void (*leave) (GLboolean));
112void __glXenterServer(GLboolean rendering);
113void __glXleaveServer(GLboolean rendering);
114
115void glxSuspendClients(void);
116void glxResumeClients(void);
117
118/*
119** State kept per client.
120*/
121struct __GLXclientStateRec {
122 /*
123 ** Whether this structure is currently being used to support a client.
124 */
125 Bool inUse;
126
127 /*
128 ** Buffer for returned data.
129 */
130 GLbyte *returnBuf;
131 GLint returnBufSize;
132
133 /*
134 ** Keep track of large rendering commands, which span multiple requests.
135 */
136 GLint largeCmdBytesSoFar; /* bytes received so far */
137 GLint largeCmdBytesTotal; /* total bytes expected */
138 GLint largeCmdRequestsSoFar; /* requests received so far */
139 GLint largeCmdRequestsTotal; /* total requests expected */
140 GLbyte *largeCmdBuf;
141 GLint largeCmdBufSize;
142
143 /* Back pointer to X client record */
144 ClientPtr client;
145
146 char *GLClientextensions;
147};
148
149/************************************************************************/
150
151/*
152** Dispatch tables.
153*/
154typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *);
155typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *);
156typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *);
157
158/*
159 * Dispatch for GLX commands.
160 */
161typedef int (*__GLXprocPtr) (__GLXclientState *, char *pc);
162
163/*
164 * Tables for computing the size of each rendering command.
165 */
166typedef int (*gl_proto_size_func) (const GLbyte *, Bool);
167
168typedef struct {
169 int bytes;
170 gl_proto_size_func varsize;
171} __GLXrenderSizeData;
172
173/************************************************************************/
174
175/*
176** X resources.
177*/
178extern RESTYPE __glXContextRes;
179extern RESTYPE __glXClientRes;
180extern RESTYPE __glXPixmapRes;
181extern RESTYPE __glXDrawableRes;
182
183/************************************************************************/
184
185/*
186** Prototypes.
187*/
188
189extern char *__glXcombine_strings(const char *, const char *);
190
191/*
192** Routines for sending swapped replies.
193*/
194
195extern void __glXSwapMakeCurrentReply(ClientPtr client,
196 xGLXMakeCurrentReply * reply);
197extern void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply);
198extern void __glXSwapQueryVersionReply(ClientPtr client,
199 xGLXQueryVersionReply * reply);
200extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client,
201 xGLXQueryContextInfoEXTReply *
202 reply, int *buf);
203extern void __glXSwapGetDrawableAttributesReply(ClientPtr client,
204 xGLXGetDrawableAttributesReply *
205 reply, CARD32 *buf);
206extern void glxSwapQueryExtensionsStringReply(ClientPtr client,
207 xGLXQueryExtensionsStringReply *
208 reply, char *buf);
209extern void glxSwapQueryServerStringReply(ClientPtr client,
210 xGLXQueryServerStringReply * reply,
211 char *buf);
212
213/*
214 * Routines for computing the size of variably-sized rendering commands.
215 */
216
217extern int __glXTypeSize(GLenum enm);
218extern int __glXImageSize(GLenum format, GLenum type,
219 GLenum target, GLsizei w, GLsizei h, GLsizei d,
220 GLint imageHeight, GLint rowLength, GLint skipImages,
221 GLint skipRows, GLint alignment);
222
223extern unsigned glxMajorVersion;
224extern unsigned glxMinorVersion;
225
226extern int __glXEventBase;
227
228#endif /* !__GLX_server_h__ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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