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 
34 typedef struct __GLXcontextRec __GLXcontext;
35 
36 struct __GLXcontextRec {
37     /*
38      ** list of context structs
39      */
40     struct __GLXcontextRec *last;
41     struct __GLXcontextRec *next;
42 
43     /*
44      ** Pointer to screen info data for this context.  This is set
45      ** when the context is created.
46      */
47     ScreenPtr pScreen;
48     __GLXscreenInfo *pGlxScreen;
49 
50     /*
51      ** This context is created with respect to this visual.
52      */
53     VisualRec *pVisual;
54     __GLXvisualConfig *pGlxVisual;
55     __GLXFBConfig *pFBConfig;
56 
57     /*
58      ** The XID of this context.
59      */
60     XID id;
61     XID *real_ids;
62 
63     /*
64      ** The XID of the shareList context.
65      */
66     XID share_id;
67 
68     /*
69      ** Visual id.
70      */
71     VisualID vid;
72     VisualID *real_vids;
73 
74     /*
75      ** screen number.
76      */
77     GLint screen;
78 
79     /*
80      ** Whether this context's ID still exists.
81      */
82     GLboolean idExists;
83 
84     /*
85      ** Whether this context is current for some client.
86      */
87     GLboolean isCurrent;
88 
89     /*
90      ** Buffers for feedback and selection.
91      */
92     GLfloat *feedbackBuf;
93     GLint feedbackBufSize;      /* number of elements allocated */
94     GLuint *selectBuf;
95     GLint selectBufSize;        /* number of elements allocated */
96 
97     /*
98      ** Set only if current drawable is a glx pixmap.
99      */
100     __GLXpixmap *pGlxPixmap;
101     __GLXpixmap *pGlxReadPixmap;
102     __glXWindow *pGlxWindow;
103     __glXWindow *pGlxReadWindow;
104     __glXPbuffer *pGlxPbuffer;
105     __glXPbuffer *pGlxReadPbuffer;
106 
107 };
108 
109 #endif                          /* !__GLX_context_h__ */
110