1 #ifdef HAVE_DIX_CONFIG_H
2 #include <dix-config.h>
5 #ifndef _GLX_context_h_
6 #define _GLX_context_h_
9 * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
10 * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
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:
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.
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
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.
38 typedef struct __GLXtextureFromPixmap __GLXtextureFromPixmap
;
39 struct __GLXtextureFromPixmap
{
40 int (*bindTexImage
) (__GLXcontext
* baseContext
,
41 int buffer
, __GLXdrawable
* pixmap
);
42 int (*releaseTexImage
) (__GLXcontext
* baseContext
,
43 int buffer
, __GLXdrawable
* pixmap
);
47 void (*destroy
) (__GLXcontext
* context
);
48 int (*makeCurrent
) (__GLXcontext
* context
);
49 int (*loseCurrent
) (__GLXcontext
* context
);
50 int (*copy
) (__GLXcontext
* dst
, __GLXcontext
* src
, unsigned long mask
);
51 Bool (*wait
) (__GLXcontext
* context
, __GLXclientState
* cl
, int *error
);
53 __GLXtextureFromPixmap
*textureFromPixmap
;
56 ** list of context structs
61 ** config struct for this context
66 ** Pointer to screen info data for this context. This is set
67 ** when the context is created.
69 __GLXscreen
*pGlxScreen
;
72 ** If this context is current for a client, this will be that client
74 ClientPtr currentClient
;
77 ** The XID of this context.
82 ** The XID of the shareList context.
87 ** Whether this context's ID still exists.
92 ** Whether this context is a direct rendering context.
97 ** This flag keeps track of whether there are unflushed GL commands.
99 GLboolean hasUnflushedCommands
;
102 ** Current rendering mode for this context.
107 * Reset notification strategy used when a GPU reset occurs.
109 GLenum resetNotificationStrategy
;
112 ** Buffers for feedback and selection.
114 GLfloat
*feedbackBuf
;
115 GLint feedbackBufSize
; /* number of elements allocated */
117 GLint selectBufSize
; /* number of elements allocated */
120 ** The drawable private this context is bound to
122 __GLXdrawable
*drawPriv
;
123 __GLXdrawable
*readPriv
;
126 void __glXContextDestroy(__GLXcontext
* context
);
128 extern int validGlxScreen(ClientPtr client
, int screen
,
129 __GLXscreen
** pGlxScreen
, int *err
);
131 extern int validGlxFBConfig(ClientPtr client
, __GLXscreen
* pGlxScreen
,
132 XID id
, __GLXconfig
** config
, int *err
);
134 extern int validGlxContext(ClientPtr client
, XID id
, int access_mode
,
135 __GLXcontext
** context
, int *err
);
137 extern __GLXcontext
*__glXdirectContextCreate(__GLXscreen
* screen
,
139 __GLXcontext
* shareContext
);
141 #endif /* !__GLX_context_h__ */