Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / dmx / glxProxy / glxcontext.h
CommitLineData
a09e091a
JB
1#ifndef _GLX_context_h_
2#define _GLX_context_h_
3
4/*
5 * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
6 * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice including the dates of first publication and
16 * either this permission notice or a reference to
17 * http://oss.sgi.com/projects/FreeB/
18 * shall be included in all copies or substantial portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
25 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 * SOFTWARE.
27 *
28 * Except as contained in this notice, the name of Silicon Graphics, Inc.
29 * shall not be used in advertising or otherwise to promote the sale, use or
30 * other dealings in this Software without prior written authorization from
31 * Silicon Graphics, Inc.
32 */
33
34typedef struct __GLXcontextRec __GLXcontext;
35
36#include "GL/internal/glcore.h"
37
38struct __GLXcontextRec {
39 /*
40 ** list of context structs
41 */
42 struct __GLXcontextRec *last;
43 struct __GLXcontextRec *next;
44
45 /*
46 ** Pointer to screen info data for this context. This is set
47 ** when the context is created.
48 */
49 ScreenPtr pScreen;
50 __GLXscreenInfo *pGlxScreen;
51
52 /*
53 ** This context is created with respect to this visual.
54 */
55 VisualRec *pVisual;
56 __GLXvisualConfig *pGlxVisual;
57 __GLXFBConfig *pFBConfig;
58
59 /*
60 ** The XID of this context.
61 */
62 XID id;
63 XID *real_ids;
64
65 /*
66 ** The XID of the shareList context.
67 */
68 XID share_id;
69
70 /*
71 ** Visual id.
72 */
73 VisualID vid;
74 VisualID *real_vids;
75
76 /*
77 ** screen number.
78 */
79 GLint screen;
80
81 /*
82 ** Whether this context's ID still exists.
83 */
84 GLboolean idExists;
85
86 /*
87 ** Whether this context is current for some client.
88 */
89 GLboolean isCurrent;
90
91 /*
92 ** Buffers for feedback and selection.
93 */
94 GLfloat *feedbackBuf;
95 GLint feedbackBufSize; /* number of elements allocated */
96 GLuint *selectBuf;
97 GLint selectBufSize; /* number of elements allocated */
98
99 /*
100 ** Set only if current drawable is a glx pixmap.
101 */
102 __GLXpixmap *pGlxPixmap;
103 __GLXpixmap *pGlxReadPixmap;
104 __glXWindow *pGlxWindow;
105 __glXWindow *pGlxReadWindow;
106 __glXPbuffer *pGlxPbuffer;
107 __glXPbuffer *pGlxReadPbuffer;
108
109};
110
111#endif /* !__GLX_context_h__ */