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