VirtualBox

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

Last change on this file since 68495 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: 7.3 KB
Line 
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/glext.h>
51#include <GL/glxproto.h>
52
53/*
54** GLX resources.
55*/
56typedef XID GLXContextID;
57typedef XID GLXPixmap;
58typedef XID GLXDrawable;
59
60typedef struct __GLXclientStateRec __GLXclientState;
61typedef struct __GLXdrawable __GLXdrawable;
62typedef struct __GLXcontext __GLXcontext;
63
64#include "glxscreens.h"
65#include "glxdrawable.h"
66#include "glxcontext.h"
67
68#ifndef True
69#define True 1
70#endif
71#ifndef False
72#define False 0
73#endif
74
75extern __GLXscreen *glxGetScreen(ScreenPtr pScreen);
76extern __GLXclientState *glxGetClient(ClientPtr pClient);
77
78/************************************************************************/
79
80void GlxSetVisualConfigs(int nconfigs, void *configs, void **privates);
81
82void __glXScreenInitVisuals(__GLXscreen * screen);
83
84/*
85** The last context used (from the server's persective) is cached.
86*/
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
118typedef void (*glx_func_ptr)(void);
119typedef glx_func_ptr (*glx_gpa_proc)(const char *);
120void __glXsetGetProcAddress(glx_gpa_proc get_proc_address);
121void *__glGetProcAddress(const char *);
122
123void
124__glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust,
125 CARD64 msc, CARD32 sbc);
126
127#if PRESENT
128void
129__glXregisterPresentCompleteNotify(void);
130#endif
131
132/*
133** State kept per client.
134*/
135struct __GLXclientStateRec {
136 /*
137 ** Whether this structure is currently being used to support a client.
138 */
139 Bool inUse;
140
141 /*
142 ** Buffer for returned data.
143 */
144 GLbyte *returnBuf;
145 GLint returnBufSize;
146
147 /*
148 ** Keep track of large rendering commands, which span multiple requests.
149 */
150 GLint largeCmdBytesSoFar; /* bytes received so far */
151 GLint largeCmdBytesTotal; /* total bytes expected */
152 GLint largeCmdRequestsSoFar; /* requests received so far */
153 GLint largeCmdRequestsTotal; /* total requests expected */
154 GLbyte *largeCmdBuf;
155 GLint largeCmdBufSize;
156
157 /* Back pointer to X client record */
158 ClientPtr client;
159
160 char *GLClientextensions;
161};
162
163/************************************************************************/
164
165/*
166** Dispatch tables.
167*/
168typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *);
169typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *);
170typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *);
171
172/*
173 * Dispatch for GLX commands.
174 */
175typedef int (*__GLXprocPtr) (__GLXclientState *, char *pc);
176
177/*
178 * Tables for computing the size of each rendering command.
179 */
180typedef int (*gl_proto_size_func) (const GLbyte *, Bool);
181
182typedef struct {
183 int bytes;
184 gl_proto_size_func varsize;
185} __GLXrenderSizeData;
186
187/************************************************************************/
188
189/*
190** X resources.
191*/
192extern RESTYPE __glXContextRes;
193extern RESTYPE __glXClientRes;
194extern RESTYPE __glXPixmapRes;
195extern RESTYPE __glXDrawableRes;
196
197/************************************************************************/
198
199/*
200** Prototypes.
201*/
202
203extern char *__glXcombine_strings(const char *, const char *);
204
205/*
206** Routines for sending swapped replies.
207*/
208
209extern void __glXSwapMakeCurrentReply(ClientPtr client,
210 xGLXMakeCurrentReply * reply);
211extern void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply);
212extern void __glXSwapQueryVersionReply(ClientPtr client,
213 xGLXQueryVersionReply * reply);
214extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client,
215 xGLXQueryContextInfoEXTReply *
216 reply, int *buf);
217extern void __glXSwapGetDrawableAttributesReply(ClientPtr client,
218 xGLXGetDrawableAttributesReply *
219 reply, CARD32 *buf);
220extern void glxSwapQueryExtensionsStringReply(ClientPtr client,
221 xGLXQueryExtensionsStringReply *
222 reply, char *buf);
223extern void glxSwapQueryServerStringReply(ClientPtr client,
224 xGLXQueryServerStringReply * reply,
225 char *buf);
226
227/*
228 * Routines for computing the size of variably-sized rendering commands.
229 */
230
231extern int __glXTypeSize(GLenum enm);
232extern int __glXImageSize(GLenum format, GLenum type,
233 GLenum target, GLsizei w, GLsizei h, GLsizei d,
234 GLint imageHeight, GLint rowLength, GLint skipImages,
235 GLint skipRows, GLint alignment);
236
237extern unsigned glxMajorVersion;
238extern unsigned glxMinorVersion;
239
240extern int __glXEventBase;
241
242#endif /* !__GLX_server_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