VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.5.3/glxcontext.h@ 32915

Last change on this file since 32915 was 17471, checked in by vboxsync, 16 years ago

export to OSE

  • Property svn:eol-style set to native
File size: 4.3 KB
Line 
1#ifdef HAVE_DIX_CONFIG_H
2#include <dix-config.h>
3#endif
4
5#ifndef _GLX_context_h_
6#define _GLX_context_h_
7
8/*
9** License Applicability. Except to the extent portions of this file are
10** made subject to an alternative license as permitted in the SGI Free
11** Software License B, Version 1.1 (the "License"), the contents of this
12** file are subject only to the provisions of the License. You may not use
13** this file except in compliance with the License. You may obtain a copy
14** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
15** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
16**
17** http://oss.sgi.com/projects/FreeB
18**
19** Note that, as provided in the License, the Software is distributed on an
20** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
21** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
23** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
24**
25** Original Code. The Original Code is: OpenGL Sample Implementation,
26** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
27** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
28** Copyright in any portions created by third parties is as indicated
29** elsewhere herein. All Rights Reserved.
30**
31** Additional Notice Provisions: The application programming interfaces
32** established by SGI in conjunction with the Original Code are The
33** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
34** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
35** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
36** Window System(R) (Version 1.3), released October 19, 1998. This software
37** was created using the OpenGL(R) version 1.2.1 Sample Implementation
38** published by SGI, but has not been independently verified as being
39** compliant with the OpenGL(R) version 1.2.1 Specification.
40**
41*/
42
43typedef struct __GLXtextureFromPixmap __GLXtextureFromPixmap;
44struct __GLXtextureFromPixmap {
45 int (*bindTexImage) (__GLXcontext *baseContext,
46 int buffer,
47 __GLXdrawable *pixmap);
48 int (*releaseTexImage) (__GLXcontext *baseContext,
49 int buffer,
50 __GLXdrawable *pixmap);
51};
52
53
54struct __GLXcontext {
55 void (*destroy) (__GLXcontext *context);
56 int (*makeCurrent) (__GLXcontext *context);
57 int (*loseCurrent) (__GLXcontext *context);
58 int (*copy) (__GLXcontext *dst,
59 __GLXcontext *src,
60 unsigned long mask);
61 int (*forceCurrent) (__GLXcontext *context);
62
63 __GLXtextureFromPixmap *textureFromPixmap;
64
65 /*
66 ** list of context structs
67 */
68 __GLXcontext *last;
69 __GLXcontext *next;
70
71 /*
72 ** list of contexts bound to the same drawable
73 */
74 __GLXcontext *nextDrawPriv;
75 __GLXcontext *nextReadPriv;
76
77 /*
78 ** config struct for this context
79 */
80 __GLXconfig *config;
81
82 /*
83 ** Pointer to screen info data for this context. This is set
84 ** when the context is created.
85 */
86 __GLXscreen *pGlxScreen;
87
88 /*
89 ** The XID of this context.
90 */
91 XID id;
92
93 /*
94 ** The XID of the shareList context.
95 */
96 XID share_id;
97
98 /*
99 ** screen number.
100 */
101 GLint screen;
102
103 /*
104 ** Whether this context's ID still exists.
105 */
106 GLboolean idExists;
107
108 /*
109 ** Whether this context is current for some client.
110 */
111 GLboolean isCurrent;
112
113 /*
114 ** Whether this context is a direct rendering context.
115 */
116 GLboolean isDirect;
117
118 /*
119 ** This flag keeps track of whether there are unflushed GL commands.
120 */
121 GLboolean hasUnflushedCommands;
122
123 /*
124 ** Current rendering mode for this context.
125 */
126 GLenum renderMode;
127
128 /*
129 ** Buffers for feedback and selection.
130 */
131 GLfloat *feedbackBuf;
132 GLint feedbackBufSize; /* number of elements allocated */
133 GLuint *selectBuf;
134 GLint selectBufSize; /* number of elements allocated */
135
136 /*
137 ** The drawable private this context is bound to
138 */
139 __GLXdrawable *drawPriv;
140 __GLXdrawable *readPriv;
141};
142
143/* pending state defines */
144#define __GLX_PENDING_RESIZE 0x1
145#define __GLX_PENDING_DESTROY 0x2
146#define __GLX_PENDING_SWAP 0x4
147
148void __glXContextDestroy(__GLXcontext *context);
149
150#endif /* !__GLX_context_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