1 | /* Copyright (c) 2001, Stanford University
|
---|
2 | * All rights reserved.
|
---|
3 | *
|
---|
4 | * See the file LICENSE.txt for information on redistributing this software.
|
---|
5 | */
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Public Chromium exports.
|
---|
9 | * Parallel Chromium applications will include this header.
|
---|
10 | */
|
---|
11 |
|
---|
12 |
|
---|
13 | #ifndef __CHROMIUM_H__
|
---|
14 | #define __CHROMIUM_H__
|
---|
15 |
|
---|
16 |
|
---|
17 | /**********************************************************************/
|
---|
18 | /***** System includes and other cruft *****/
|
---|
19 | /**********************************************************************/
|
---|
20 |
|
---|
21 | #include "cr_compiler.h"
|
---|
22 |
|
---|
23 | /*
|
---|
24 | * We effectively wrap gl.h, glu.h, etc, just like GLUT
|
---|
25 | */
|
---|
26 |
|
---|
27 | #ifndef GL_GLEXT_PROTOTYPES
|
---|
28 | #define GL_GLEXT_PROTOTYPES
|
---|
29 | #endif
|
---|
30 |
|
---|
31 | #if defined(WINDOWS)
|
---|
32 | #define WIN32_LEAN_AND_MEAN
|
---|
33 | #define WGL_APIENTRY __stdcall
|
---|
34 | #include <windows.h>
|
---|
35 | #elif defined(DARWIN)
|
---|
36 | /* nothing */
|
---|
37 | #else
|
---|
38 | #define GLX
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | #include <GL/gl.h>
|
---|
42 |
|
---|
43 | #ifndef WINDOWS
|
---|
44 | #include <GL/glu.h>
|
---|
45 | #endif
|
---|
46 |
|
---|
47 |
|
---|
48 | #ifdef GLX
|
---|
49 | #ifndef GLX_GLXEXT_PROTOTYPES
|
---|
50 | #define GLX_GLXEXT_PROTOTYPES
|
---|
51 | #endif
|
---|
52 | #include <GL/glx.h>
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | #ifdef USE_OSMESA
|
---|
56 | #include <GL/osmesa.h>
|
---|
57 | #endif
|
---|
58 |
|
---|
59 | #ifdef DARWIN
|
---|
60 | #include <stddef.h>
|
---|
61 | #elif !defined(FreeBSD)
|
---|
62 | #include <malloc.h> /* to get ptrdiff_t used below */
|
---|
63 | #endif
|
---|
64 |
|
---|
65 | #include <GL/glext.h>
|
---|
66 |
|
---|
67 | #ifdef __cplusplus
|
---|
68 | extern "C" {
|
---|
69 | #endif
|
---|
70 |
|
---|
71 | #ifndef APIENTRY
|
---|
72 | #define APIENTRY
|
---|
73 | #endif
|
---|
74 |
|
---|
75 |
|
---|
76 | /**********************************************************************/
|
---|
77 | /***** Define things that might have been missing in gl.h *****/
|
---|
78 | /**********************************************************************/
|
---|
79 |
|
---|
80 | /*
|
---|
81 | * Define missing GLX tokens:
|
---|
82 | */
|
---|
83 |
|
---|
84 | #ifndef GLX_SAMPLE_BUFFERS_SGIS
|
---|
85 | #define GLX_SAMPLE_BUFFERS_SGIS 0x186a0 /*100000*/
|
---|
86 | #endif
|
---|
87 | #ifndef GLX_SAMPLES_SGIS
|
---|
88 | #define GLX_SAMPLES_SGIS 0x186a1 /*100001*/
|
---|
89 | #endif
|
---|
90 | #ifndef GLX_VISUAL_CAVEAT_EXT
|
---|
91 | #define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */
|
---|
92 | #endif
|
---|
93 |
|
---|
94 | /*
|
---|
95 | * Define missing WGL tokens:
|
---|
96 | */
|
---|
97 | #ifndef WGL_COLOR_BITS_EXT
|
---|
98 | #define WGL_COLOR_BITS_EXT 0x2014
|
---|
99 | #endif
|
---|
100 | #ifndef WGL_DRAW_TO_WINDOW_EXT
|
---|
101 | #define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
---|
102 | #endif
|
---|
103 | #ifndef WGL_FULL_ACCELERATION_EXT
|
---|
104 | #define WGL_FULL_ACCELERATION_EXT 0x2027
|
---|
105 | #endif
|
---|
106 | #ifndef WGL_ACCELERATION_EXT
|
---|
107 | #define WGL_ACCELERATION_EXT 0x2003
|
---|
108 | #endif
|
---|
109 | #ifndef WGL_TYPE_RGBA_EXT
|
---|
110 | #define WGL_TYPE_RGBA_EXT 0x202B
|
---|
111 | #endif
|
---|
112 | #ifndef WGL_RED_BITS_EXT
|
---|
113 | #define WGL_RED_BITS_EXT 0x2015
|
---|
114 | #endif
|
---|
115 | #ifndef WGL_GREEN_BITS_EXT
|
---|
116 | #define WGL_GREEN_BITS_EXT 0x2017
|
---|
117 | #endif
|
---|
118 | #ifndef WGL_BLUE_BITS_EXT
|
---|
119 | #define WGL_BLUE_BITS_EXT 0x2019
|
---|
120 | #endif
|
---|
121 | #ifndef WGL_ALPHA_BITS_EXT
|
---|
122 | #define WGL_ALPHA_BITS_EXT 0x201B
|
---|
123 | #endif
|
---|
124 | #ifndef WGL_DOUBLE_BUFFER_EXT
|
---|
125 | #define WGL_DOUBLE_BUFFER_EXT 0x2011
|
---|
126 | #endif
|
---|
127 | #ifndef WGL_STEREO_EXT
|
---|
128 | #define WGL_STEREO_EXT 0x2012
|
---|
129 | #endif
|
---|
130 | #ifndef WGL_ACCUM_RED_BITS_EXT
|
---|
131 | #define WGL_ACCUM_RED_BITS_EXT 0x201E
|
---|
132 | #endif
|
---|
133 | #ifndef WGL_ACCUM_GREEN_BITS_EXT
|
---|
134 | #define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
---|
135 | #endif
|
---|
136 | #ifndef WGL_ACCUM_BLUE_BITS_EXT
|
---|
137 | #define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
---|
138 | #endif
|
---|
139 | #ifndef WGL_ACCUM_ALPHA_BITS_EXT
|
---|
140 | #define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
---|
141 | #endif
|
---|
142 | #ifndef WGL_DEPTH_BITS_EXT
|
---|
143 | #define WGL_DEPTH_BITS_EXT 0x2022
|
---|
144 | #endif
|
---|
145 | #ifndef WGL_STENCIL_BITS_EXT
|
---|
146 | #define WGL_STENCIL_BITS_EXT 0x2023
|
---|
147 | #endif
|
---|
148 | #ifndef WGL_SAMPLE_BUFFERS_EXT
|
---|
149 | #define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
---|
150 | #endif
|
---|
151 | #ifndef WGL_SAMPLES_EXT
|
---|
152 | #define WGL_SAMPLES_EXT 0x2042
|
---|
153 | #endif
|
---|
154 | #ifndef WGL_SUPPORT_OPENGL_ARB
|
---|
155 | #define WGL_SUPPORT_OPENGL_ARB 0x2010
|
---|
156 | #endif
|
---|
157 | #ifndef WGL_NUMBER_PIXEL_FORMATS_ARB
|
---|
158 | #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
---|
159 | #endif
|
---|
160 | #ifndef WGL_FULL_ACCELERATION_ARB
|
---|
161 | #define WGL_FULL_ACCELERATION_ARB 0x2027
|
---|
162 | #endif
|
---|
163 | #ifndef WGL_SWAP_UNDEFINED_ARB
|
---|
164 | #define WGL_SWAP_UNDEFINED_ARB 0x202A
|
---|
165 | #endif
|
---|
166 | #ifndef WGL_TYPE_RGBA_ARB
|
---|
167 | #define WGL_TYPE_RGBA_ARB 0x202B
|
---|
168 | #endif
|
---|
169 | #ifndef WGL_DRAW_TO_WINDOW_ARB
|
---|
170 | #define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
---|
171 | #endif
|
---|
172 | #ifndef WGL_DRAW_TO_BITMAP_ARB
|
---|
173 | #define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
---|
174 | #endif
|
---|
175 | #ifndef WGL_DOUBLE_BUFFER_ARB
|
---|
176 | #define WGL_DOUBLE_BUFFER_ARB 0x2011
|
---|
177 | #endif
|
---|
178 | #ifndef WGL_NEED_PALETTE_ARB
|
---|
179 | #define WGL_NEED_PALETTE_ARB 0x2004
|
---|
180 | #endif
|
---|
181 | #ifndef WGL_NEED_SYSTEM_PALETTE_ARB
|
---|
182 | #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
---|
183 | #endif
|
---|
184 | #ifndef WGL_SWAP_LAYER_BUFFERS_ARB
|
---|
185 | #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
---|
186 | #endif
|
---|
187 | #ifndef WGL_NUMBER_OVERLAYS_ARB
|
---|
188 | #define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
---|
189 | #endif
|
---|
190 | #ifndef WGL_NUMBER_UNDERLAYS_ARB
|
---|
191 | #define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
---|
192 | #endif
|
---|
193 | #ifndef WGL_TRANSPARENT_ARB
|
---|
194 | #define WGL_TRANSPARENT_ARB 0x200A
|
---|
195 | #endif
|
---|
196 | #ifndef WGL_TRANSPARENT_RED_VALUE_ARB
|
---|
197 | #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
---|
198 | #endif
|
---|
199 | #ifndef WGL_TRANSPARENT_GREEN_VALUE_ARB
|
---|
200 | #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
---|
201 | #endif
|
---|
202 | #ifndef WGL_TRANSPARENT_BLUE_VALUE_ARB
|
---|
203 | #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
---|
204 | #endif
|
---|
205 | #ifndef WGL_TRANSPARENT_ALPHA_VALUE_ARB
|
---|
206 | #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
---|
207 | #endif
|
---|
208 | #ifndef WGL_TRANSPARENT_INDEX_VALUE_ARB
|
---|
209 | #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
---|
210 | #endif
|
---|
211 | #ifndef WGL_SHARE_STENCIL_ARB
|
---|
212 | #define WGL_SHARE_STENCIL_ARB 0x200D
|
---|
213 | #endif
|
---|
214 | #ifndef WGL_SHARE_ACCUM_ARB
|
---|
215 | #define WGL_SHARE_ACCUM_ARB 0x200E
|
---|
216 | #endif
|
---|
217 | #ifndef WGL_SUPPORT_GDI_ARB
|
---|
218 | #define WGL_SUPPORT_GDI_ARB 0x200F
|
---|
219 | #endif
|
---|
220 | #ifndef WGL_RED_BITS_ARB
|
---|
221 | #define WGL_RED_BITS_ARB 0x2015
|
---|
222 | #endif
|
---|
223 | #ifndef WGL_RED_SHIFT_ARB
|
---|
224 | #define WGL_RED_SHIFT_ARB 0x2016
|
---|
225 | #endif
|
---|
226 | #ifndef WGL_GREEN_BITS_ARB
|
---|
227 | #define WGL_GREEN_BITS_ARB 0x2017
|
---|
228 | #endif
|
---|
229 | #ifndef WGL_GREEN_SHIFT_ARB
|
---|
230 | #define WGL_GREEN_SHIFT_ARB 0x2018
|
---|
231 | #endif
|
---|
232 | #ifndef WGL_BLUE_BITS_ARB
|
---|
233 | #define WGL_BLUE_BITS_ARB 0x2019
|
---|
234 | #endif
|
---|
235 | #ifndef WGL_BLUE_SHIFT_ARB
|
---|
236 | #define WGL_BLUE_SHIFT_ARB 0x201A
|
---|
237 | #endif
|
---|
238 | #ifndef WGL_ALPHA_BITS_ARB
|
---|
239 | #define WGL_ALPHA_BITS_ARB 0x201B
|
---|
240 | #endif
|
---|
241 | #ifndef WGL_ALPHA_SHIFT_ARB
|
---|
242 | #define WGL_ALPHA_SHIFT_ARB 0x201C
|
---|
243 | #endif
|
---|
244 | #ifndef WGL_ACCUM_BITS_ARB
|
---|
245 | #define WGL_ACCUM_BITS_ARB 0x201D
|
---|
246 | #endif
|
---|
247 | #ifndef WGL_ACCUM_RED_BITS_ARB
|
---|
248 | #define WGL_ACCUM_RED_BITS_ARB 0x201E
|
---|
249 | #endif
|
---|
250 | #ifndef WGL_ACCUM_GREEN_BITS_ARB
|
---|
251 | #define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
---|
252 | #endif
|
---|
253 | #ifndef WGL_ACCUM_BLUE_BITS_ARB
|
---|
254 | #define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
---|
255 | #endif
|
---|
256 | #ifndef WGL_ACCUM_ALPHA_BITS_ARB
|
---|
257 | #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
---|
258 | #endif
|
---|
259 | #ifndef WGL_DEPTH_BITS_ARB
|
---|
260 | #define WGL_DEPTH_BITS_ARB 0x2022
|
---|
261 | #endif
|
---|
262 | #ifndef WGL_STENCIL_BITS_ARB
|
---|
263 | #define WGL_STENCIL_BITS_ARB 0x2023
|
---|
264 | #endif
|
---|
265 | #ifndef WGL_AUX_BUFFERS_ARB
|
---|
266 | #define WGL_AUX_BUFFERS_ARB 0x2024
|
---|
267 | #endif
|
---|
268 | #ifndef WGL_STEREO_ARB
|
---|
269 | #define WGL_STEREO_ARB 0x2012
|
---|
270 | #endif
|
---|
271 | #ifndef WGL_ACCELERATION_ARB
|
---|
272 | #define WGL_ACCELERATION_ARB 0x2003
|
---|
273 | #endif
|
---|
274 | #ifndef WGL_SHARE_DEPTH_ARB
|
---|
275 | #define WGL_SHARE_DEPTH_ARB 0x200C
|
---|
276 | #endif
|
---|
277 | #ifndef WGL_PIXEL_TYPE_ARB
|
---|
278 | #define WGL_PIXEL_TYPE_ARB 0x2013
|
---|
279 | #endif
|
---|
280 | #ifndef WGL_COLOR_BITS_ARB
|
---|
281 | #define WGL_COLOR_BITS_ARB 0x2014
|
---|
282 | #endif
|
---|
283 | #ifndef WGL_SWAP_METHOD_ARB
|
---|
284 | #define WGL_SWAP_METHOD_ARB 0x2007
|
---|
285 | #endif
|
---|
286 |
|
---|
287 | /*
|
---|
288 | * Define missing 1.2 tokens:
|
---|
289 | */
|
---|
290 | #ifndef GL_SMOOTH_POINT_SIZE_RANGE
|
---|
291 | #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
---|
292 | #endif
|
---|
293 |
|
---|
294 | #ifndef GL_SMOOTH_POINT_SIZE_GRANULARITY
|
---|
295 | #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
|
---|
296 | #endif
|
---|
297 |
|
---|
298 | #ifndef GL_SMOOTH_LINE_WIDTH_RANGE
|
---|
299 | #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
---|
300 | #endif
|
---|
301 |
|
---|
302 | #ifndef GL_SMOOTH_LINE_WIDTH_GRANULARITY
|
---|
303 | #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
|
---|
304 | #endif
|
---|
305 |
|
---|
306 | #ifndef GL_ALIASED_POINT_SIZE_RANGE
|
---|
307 | #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
---|
308 | #endif
|
---|
309 |
|
---|
310 | #ifndef GL_ALIASED_LINE_WIDTH_RANGE
|
---|
311 | #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
---|
312 | #endif
|
---|
313 |
|
---|
314 | #ifndef GL_COLOR_MATRIX_STACK_DEPTH
|
---|
315 | #define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
|
---|
316 | #endif
|
---|
317 |
|
---|
318 | #ifndef GL_COLOR_MATRIX
|
---|
319 | #define GL_COLOR_MATRIX 0x80B1
|
---|
320 | #endif
|
---|
321 |
|
---|
322 | #ifndef GL_TEXTURE_3D
|
---|
323 | #define GL_TEXTURE_3D 0x806F
|
---|
324 | #endif
|
---|
325 |
|
---|
326 | #ifndef GL_MAX_3D_TEXTURE_SIZE
|
---|
327 | #define GL_MAX_3D_TEXTURE_SIZE 0x8073
|
---|
328 | #endif
|
---|
329 |
|
---|
330 | #ifndef GL_PACK_SKIP_IMAGES
|
---|
331 | #define GL_PACK_SKIP_IMAGES 0x806B
|
---|
332 | #endif
|
---|
333 |
|
---|
334 | #ifndef GL_PACK_IMAGE_HEIGHT
|
---|
335 | #define GL_PACK_IMAGE_HEIGHT 0x806C
|
---|
336 | #endif
|
---|
337 |
|
---|
338 | #ifndef GL_UNPACK_SKIP_IMAGES
|
---|
339 | #define GL_UNPACK_SKIP_IMAGES 0x806D
|
---|
340 | #endif
|
---|
341 |
|
---|
342 | #ifndef GL_UNPACK_IMAGE_HEIGHT
|
---|
343 | #define GL_UNPACK_IMAGE_HEIGHT 0x806E
|
---|
344 | #endif
|
---|
345 |
|
---|
346 | #ifndef GL_PROXY_TEXTURE_3D
|
---|
347 | #define GL_PROXY_TEXTURE_3D 0x8070
|
---|
348 | #endif
|
---|
349 |
|
---|
350 | #ifndef GL_TEXTURE_DEPTH
|
---|
351 | #define GL_TEXTURE_DEPTH 0x8071
|
---|
352 | #endif
|
---|
353 |
|
---|
354 | #ifndef GL_TEXTURE_WRAP_R
|
---|
355 | #define GL_TEXTURE_WRAP_R 0x8072
|
---|
356 | #endif
|
---|
357 |
|
---|
358 | #ifndef GL_TEXTURE_BINDING_3D
|
---|
359 | #define GL_TEXTURE_BINDING_3D 0x806A
|
---|
360 | #endif
|
---|
361 |
|
---|
362 | #ifndef GL_MAX_ELEMENTS_VERTICES
|
---|
363 | #define GL_MAX_ELEMENTS_VERTICES 0x80E8
|
---|
364 | #endif
|
---|
365 |
|
---|
366 | #ifndef GL_MAX_ELEMENTS_INDICES
|
---|
367 | #define GL_MAX_ELEMENTS_INDICES 0x80E9
|
---|
368 | #endif
|
---|
369 |
|
---|
370 |
|
---|
371 | /*
|
---|
372 | * Define missing ARB_imaging tokens
|
---|
373 | */
|
---|
374 |
|
---|
375 | #ifndef GL_BLEND_EQUATION
|
---|
376 | #define GL_BLEND_EQUATION 0x8009
|
---|
377 | #endif
|
---|
378 |
|
---|
379 | #ifndef GL_MIN
|
---|
380 | #define GL_MIN 0x8007
|
---|
381 | #endif
|
---|
382 |
|
---|
383 | #ifndef GL_MAX
|
---|
384 | #define GL_MAX 0x8008
|
---|
385 | #endif
|
---|
386 |
|
---|
387 | #ifndef GL_FUNC_ADD
|
---|
388 | #define GL_FUNC_ADD 0x8006
|
---|
389 | #endif
|
---|
390 |
|
---|
391 | #ifndef GL_FUNC_SUBTRACT
|
---|
392 | #define GL_FUNC_SUBTRACT 0x800A
|
---|
393 | #endif
|
---|
394 |
|
---|
395 | #ifndef GL_FUNC_REVERSE_SUBTRACT
|
---|
396 | #define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
---|
397 | #endif
|
---|
398 |
|
---|
399 | #ifndef GL_BLEND_COLOR
|
---|
400 | #define GL_BLEND_COLOR 0x8005
|
---|
401 | #endif
|
---|
402 |
|
---|
403 | #ifndef GL_PER_STAGE_CONSTANTS_NV
|
---|
404 | #define GL_PER_STAGE_CONSTANTS_NV 0x8535
|
---|
405 | #endif
|
---|
406 |
|
---|
407 | #ifndef GL_FOG_COORDINATE_ARRAY_POINTER_EXT
|
---|
408 | #define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
|
---|
409 | #endif
|
---|
410 |
|
---|
411 | typedef void (*CR_GLXFuncPtr)();
|
---|
412 | #ifndef GLX_ARB_get_proc_address
|
---|
413 | #define GLX_ARB_get_proc_address 1
|
---|
414 | CR_GLXFuncPtr glXGetProcAddressARB( const GLubyte *name );
|
---|
415 | #endif /* GLX_ARB_get_proc_address */
|
---|
416 |
|
---|
417 | #ifndef GLX_VERSION_1_4
|
---|
418 | CR_GLXFuncPtr glXGetProcAddress( const GLubyte *name );
|
---|
419 | #endif /* GLX_ARB_get_proc_address */
|
---|
420 |
|
---|
421 | #ifndef GL_RASTER_POSITION_UNCLIPPED_IBM
|
---|
422 | #define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
|
---|
423 | #endif
|
---|
424 |
|
---|
425 | #ifdef WINDOWS
|
---|
426 | /* XXX how about this prototype for wglGetProcAddress()?
|
---|
427 | PROC WINAPI wglGetProcAddress_prox( LPCSTR name )
|
---|
428 | */
|
---|
429 | #endif
|
---|
430 |
|
---|
431 |
|
---|
432 | #ifndef GL_VERSION_1_5
|
---|
433 |
|
---|
434 | typedef ptrdiff_t GLintptr;
|
---|
435 | typedef ptrdiff_t GLsizeiptr;
|
---|
436 |
|
---|
437 | /* prototype these functions for opengl_stub/getprocaddress.c */
|
---|
438 | extern void APIENTRY glGenQueries(GLsizei n, GLuint *ids);
|
---|
439 | extern void APIENTRY glDeleteQueries(GLsizei n, const GLuint *ids);
|
---|
440 | extern GLboolean APIENTRY glIsQuery(GLuint id);
|
---|
441 | extern void APIENTRY glBeginQuery(GLenum target, GLuint id);
|
---|
442 | extern void APIENTRY glEndQuery(GLenum target);
|
---|
443 | extern void APIENTRY glGetQueryiv(GLenum target, GLenum pname, GLint *params);
|
---|
444 | extern void APIENTRY glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params);
|
---|
445 | extern void APIENTRY glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
|
---|
446 | extern void APIENTRY glBindBuffer(GLenum, GLuint);
|
---|
447 | extern void APIENTRY glDeleteBuffers(GLsizei, const GLuint *);
|
---|
448 | extern void APIENTRY glGenBuffers(GLsizei, GLuint *);
|
---|
449 | extern GLboolean APIENTRY glIsBuffer(GLuint);
|
---|
450 | extern void APIENTRY glBufferData(GLenum, GLsizeiptr, const GLvoid *, GLenum);
|
---|
451 | extern void APIENTRY glBufferSubData(GLenum, GLintptr, GLsizeiptr, const GLvoid *);
|
---|
452 | extern void APIENTRY glGetBufferSubData(GLenum, GLintptr, GLsizeiptr, GLvoid *);
|
---|
453 | extern GLvoid* APIENTRY glMapBuffer(GLenum, GLenum);
|
---|
454 | extern GLboolean APIENTRY glUnmapBuffer(GLenum);
|
---|
455 | extern void APIENTRY glGetBufferParameteriv(GLenum, GLenum, GLint *);
|
---|
456 | extern void APIENTRY glGetBufferPointerv(GLenum, GLenum, GLvoid* *);
|
---|
457 |
|
---|
458 | #endif
|
---|
459 |
|
---|
460 |
|
---|
461 | /**********************************************************************/
|
---|
462 | /***** Chromium Extensions to OpenGL *****/
|
---|
463 | /***** *****/
|
---|
464 | /***** Chromium owns the OpenGL enum range 0x8AF0-0x8B2F *****/
|
---|
465 | /**********************************************************************/
|
---|
466 |
|
---|
467 | #ifndef GL_CR_synchronization
|
---|
468 | #define GL_CR_synchronization 1
|
---|
469 |
|
---|
470 | typedef void (APIENTRY *glBarrierCreateCRProc) (GLuint name, GLuint count);
|
---|
471 | typedef void (APIENTRY *glBarrierDestroyCRProc) (GLuint name);
|
---|
472 | typedef void (APIENTRY *glBarrierExecCRProc) (GLuint name);
|
---|
473 | typedef void (APIENTRY *glSemaphoreCreateCRProc) (GLuint name, GLuint count);
|
---|
474 | typedef void (APIENTRY *glSemaphoreDestroyCRProc) (GLuint name);
|
---|
475 | typedef void (APIENTRY *glSemaphorePCRProc) (GLuint name);
|
---|
476 | typedef void (APIENTRY *glSemaphoreVCRProc) (GLuint name);
|
---|
477 |
|
---|
478 | extern void APIENTRY glBarrierCreateCR(GLuint name, GLuint count);
|
---|
479 | extern void APIENTRY glBarrierDestroyCR(GLuint name);
|
---|
480 | extern void APIENTRY glBarrierExecCR(GLuint name);
|
---|
481 | extern void APIENTRY glSemaphoreCreateCR(GLuint name, GLuint count);
|
---|
482 | extern void APIENTRY glSemaphoreDestroyCR(GLuint name);
|
---|
483 | extern void APIENTRY glSemaphorePCR(GLuint name);
|
---|
484 | extern void APIENTRY glSemaphoreVCR(GLuint name);
|
---|
485 |
|
---|
486 | #endif /* GL_CR_synchronization */
|
---|
487 |
|
---|
488 |
|
---|
489 | #ifndef GL_CR_bounds_info
|
---|
490 | #define GL_CR_bounds_info 1
|
---|
491 | /* Private, internal Chromium function */
|
---|
492 | /*
|
---|
493 | typedef void (APIENTRY *glBoundsInfoCRProc)(const CRrecti *, const GLbyte *, GLint, GLint);
|
---|
494 | */
|
---|
495 | #endif /* GL_CR_bounds_info */
|
---|
496 |
|
---|
497 |
|
---|
498 | #ifndef GL_CR_state_parameter
|
---|
499 | #define GL_CR_state_parameter 1
|
---|
500 |
|
---|
501 | typedef void (APIENTRY *glChromiumParameteriCRProc) (GLenum target, GLint value);
|
---|
502 | typedef void (APIENTRY *glChromiumParameterfCRProc) (GLenum target, GLfloat value);
|
---|
503 | typedef void (APIENTRY *glChromiumParametervCRProc) (GLenum target, GLenum type, GLsizei count, const GLvoid *values);
|
---|
504 | typedef void (APIENTRY *glGetChromiumParametervCRProc) (GLenum target, GLuint index, GLenum type, GLsizei count, GLvoid *values);
|
---|
505 |
|
---|
506 | extern void APIENTRY glChromiumParameteriCR(GLenum target, GLint value);
|
---|
507 | extern void APIENTRY glChromiumParameterfCR(GLenum target, GLfloat value);
|
---|
508 | extern void APIENTRY glChromiumParametervCR(GLenum target, GLenum type, GLsizei count, const GLvoid *values);
|
---|
509 | extern void APIENTRY glGetChromiumParametervCR(GLenum target, GLuint index, GLenum type, GLsizei count, GLvoid *values);
|
---|
510 |
|
---|
511 |
|
---|
512 | #endif /* GL_CR_state_parameter */
|
---|
513 |
|
---|
514 |
|
---|
515 | #ifndef GL_CR_cursor_position
|
---|
516 | #define GL_CR_cursor_position 1
|
---|
517 | /* For virtual cursor feature (show_cursor) */
|
---|
518 |
|
---|
519 | #define GL_CURSOR_POSITION_CR 0x8AF0
|
---|
520 |
|
---|
521 | #endif /* GL_CR_cursor_position */
|
---|
522 |
|
---|
523 |
|
---|
524 | #ifndef GL_CR_bounding_box
|
---|
525 | #define GL_CR_bounding_box 1
|
---|
526 | /* To set bounding box from client app */
|
---|
527 |
|
---|
528 | #define GL_DEFAULT_BBOX_CR 0x8AF1
|
---|
529 | #define GL_SCREEN_BBOX_CR 0x8AF2
|
---|
530 | #define GL_OBJECT_BBOX_CR 0x8AF3
|
---|
531 |
|
---|
532 | #endif /* GL_CR_bounding_box */
|
---|
533 |
|
---|
534 |
|
---|
535 | #ifndef GL_CR_print_string
|
---|
536 | #define GL_CR_print_string 1
|
---|
537 | /* To print a string to stdout */
|
---|
538 | #define GL_PRINT_STRING_CR 0x8AF4
|
---|
539 |
|
---|
540 | #endif /* GL_CR_print_string */
|
---|
541 |
|
---|
542 |
|
---|
543 | #ifndef GL_CR_tilesort_info
|
---|
544 | #define GL_CR_tilesort_info 1
|
---|
545 | /* To query tilesort information */
|
---|
546 |
|
---|
547 | #define GL_MURAL_SIZE_CR 0x8AF5
|
---|
548 | #define GL_NUM_SERVERS_CR 0x8AF6
|
---|
549 | #define GL_NUM_TILES_CR 0x8AF7
|
---|
550 | #define GL_TILE_BOUNDS_CR 0x8AF8
|
---|
551 | #define GL_VERTEX_COUNTS_CR 0x8AF9
|
---|
552 | #define GL_RESET_VERTEX_COUNTERS_CR 0x8AFA
|
---|
553 | #define GL_SET_MAX_VIEWPORT_CR 0x8AFB
|
---|
554 |
|
---|
555 | #endif /* GL_CR_tilesort_info */
|
---|
556 |
|
---|
557 |
|
---|
558 | #ifndef GL_CR_head_spu_name
|
---|
559 | #define GL_CR_head_spu_name 1
|
---|
560 | /* To fetch name of first SPU on a node */
|
---|
561 |
|
---|
562 | #define GL_HEAD_SPU_NAME_CR 0x8AFC
|
---|
563 |
|
---|
564 | #endif /* GL_CR_head_spu_name */
|
---|
565 |
|
---|
566 |
|
---|
567 | #ifndef GL_CR_performance_info
|
---|
568 | #define GL_CR_performance_info 1
|
---|
569 | /* For gathering performance metrics */
|
---|
570 |
|
---|
571 | #define GL_PERF_GET_FRAME_DATA_CR 0x8AFD
|
---|
572 | #define GL_PERF_GET_TIMER_DATA_CR 0x8AFE
|
---|
573 | #define GL_PERF_DUMP_COUNTERS_CR 0x8AFF
|
---|
574 | #define GL_PERF_SET_TOKEN_CR 0x8B00
|
---|
575 | #define GL_PERF_SET_DUMP_ON_SWAP_CR 0x8B01
|
---|
576 | #define GL_PERF_SET_DUMP_ON_FINISH_CR 0x8B02
|
---|
577 | #define GL_PERF_SET_DUMP_ON_FLUSH_CR 0x8B03
|
---|
578 | #define GL_PERF_START_TIMER_CR 0x8B04
|
---|
579 | #define GL_PERF_STOP_TIMER_CR 0x8B05
|
---|
580 |
|
---|
581 | #endif /* GL_CR_performance_info */
|
---|
582 |
|
---|
583 |
|
---|
584 | #ifndef GL_CR_window_size
|
---|
585 | #define GL_CR_window_size 1
|
---|
586 | /* To communicate window size changes */
|
---|
587 |
|
---|
588 | #define GL_WINDOW_SIZE_CR 0x8B06
|
---|
589 | #define GL_MAX_WINDOW_SIZE_CR 0x8B24 /* new */
|
---|
590 |
|
---|
591 | #endif /* GL_CR_window_size */
|
---|
592 |
|
---|
593 |
|
---|
594 | #ifndef GL_CR_tile_info
|
---|
595 | #define GL_CR_tile_info 1
|
---|
596 | /* To send new tile information to a server */
|
---|
597 |
|
---|
598 | #define GL_TILE_INFO_CR 0x8B07
|
---|
599 |
|
---|
600 | #endif /* GL_CR_tile_info */
|
---|
601 |
|
---|
602 |
|
---|
603 | #ifndef GL_CR_gather
|
---|
604 | #define GL_CR_gather 1
|
---|
605 | /* For aggregate transfers */
|
---|
606 |
|
---|
607 | #define GL_GATHER_DRAWPIXELS_CR 0x8B08
|
---|
608 | #define GL_GATHER_PACK_CR 0x8B09
|
---|
609 | #define GL_GATHER_CONNECT_CR 0x8B0A
|
---|
610 | #define GL_GATHER_POST_SWAPBUFFERS_CR 0x8B0B
|
---|
611 |
|
---|
612 | #endif /* GL_CR_gather */
|
---|
613 |
|
---|
614 |
|
---|
615 | #ifndef GL_CR_saveframe
|
---|
616 | #define GL_CR_saveframe 1
|
---|
617 |
|
---|
618 | #define GL_SAVEFRAME_ENABLED_CR 0x8B0C
|
---|
619 | #define GL_SAVEFRAME_FRAMENUM_CR 0x8B0D
|
---|
620 | #define GL_SAVEFRAME_STRIDE_CR 0x8B0E
|
---|
621 | #define GL_SAVEFRAME_SINGLE_CR 0x8B0F
|
---|
622 | #define GL_SAVEFRAME_FILESPEC_CR 0x8B10
|
---|
623 |
|
---|
624 | #endif /* GL_CR_saveframe */
|
---|
625 |
|
---|
626 |
|
---|
627 | #ifndef GL_CR_readback_barrier_size
|
---|
628 | #define GL_CR_readback_barrier_size 1
|
---|
629 |
|
---|
630 | #define GL_READBACK_BARRIER_SIZE_CR 0x8B11
|
---|
631 |
|
---|
632 | #endif /* GL_CR_readback_barrier_size */
|
---|
633 |
|
---|
634 |
|
---|
635 | #ifndef GL_CR_server_id_sharing
|
---|
636 | #define GL_CR_server_id_sharing 1
|
---|
637 |
|
---|
638 | #define GL_SHARED_DISPLAY_LISTS_CR 0x8B12
|
---|
639 | #define GL_SHARED_TEXTURE_OBJECTS_CR 0x8B13
|
---|
640 | #define GL_SHARED_PROGRAMS_CR 0x8B14
|
---|
641 |
|
---|
642 | #endif /* GL_CR_server_id_sharing */
|
---|
643 |
|
---|
644 |
|
---|
645 | #ifndef GL_CR_server_matrix
|
---|
646 | #define GL_CR_server_matrix 1
|
---|
647 |
|
---|
648 | #define GL_SERVER_VIEW_MATRIX_CR 0x8B15
|
---|
649 | #define GL_SERVER_PROJECTION_MATRIX_CR 0x8B16
|
---|
650 | #define GL_SERVER_FRUSTUM_CR 0x8B17
|
---|
651 | #define GL_SERVER_CURRENT_EYE_CR 0x8B18
|
---|
652 |
|
---|
653 | #endif /* GL_CR_server_matrix */
|
---|
654 |
|
---|
655 |
|
---|
656 | #ifndef GL_CR_window_position
|
---|
657 | #define GL_CR_window_position 1
|
---|
658 |
|
---|
659 | #define GL_WINDOW_POSITION_CR 0x8B19
|
---|
660 |
|
---|
661 | #endif /* GL_CR_window_position */
|
---|
662 |
|
---|
663 |
|
---|
664 | #ifndef GL_CR_zpix
|
---|
665 | #define GL_CR_zpix 1
|
---|
666 |
|
---|
667 | #define GL_ZLIB_COMPRESSION_CR 0x8B20
|
---|
668 | #define GL_RLE_COMPRESSION_CR 0x8B21
|
---|
669 | #define GL_PLE_COMPRESSION_CR 0x8B22
|
---|
670 |
|
---|
671 | /* XXX A better name would be glCompressedDrawPixelsCR() */
|
---|
672 | extern void APIENTRY glZPixCR(GLsizei width, GLsizei height, GLenum format,
|
---|
673 | GLenum type, GLenum compressionType,
|
---|
674 | GLint client, GLint compressedSize,
|
---|
675 | const GLvoid *image);
|
---|
676 |
|
---|
677 | #endif /* GL_CR_zpix */
|
---|
678 |
|
---|
679 | /*Allow to use glGetString to query real host GPU info*/
|
---|
680 | #ifndef GL_CR_real_vendor_strings
|
---|
681 | #define GL_CR_real_vendor_strings 1
|
---|
682 | #define GL_REAL_VENDOR 0x8B23
|
---|
683 | #define GL_REAL_VERSION 0x8B24
|
---|
684 | #define GL_REAL_RENDERER 0x8B25
|
---|
685 | #define GL_REAL_EXTENSIONS 0x8B26
|
---|
686 | #endif
|
---|
687 |
|
---|
688 | /*Global resource ids sharing*/
|
---|
689 | #define GL_SHARE_CONTEXT_RESOURCES_CR 0x8B27
|
---|
690 |
|
---|
691 | /**********************************************************************/
|
---|
692 | /***** Chromium-specific API *****/
|
---|
693 | /**********************************************************************/
|
---|
694 |
|
---|
695 |
|
---|
696 | /*
|
---|
697 | * Accepted by crCreateContext() and crCreateWindow() visBits parameter.
|
---|
698 | * Used to communicate visual attributes throughout Chromium.
|
---|
699 | */
|
---|
700 | #define CR_RGB_BIT 0x1
|
---|
701 | #define CR_ALPHA_BIT 0x2
|
---|
702 | #define CR_DEPTH_BIT 0x4
|
---|
703 | #define CR_STENCIL_BIT 0x8
|
---|
704 | #define CR_ACCUM_BIT 0x10
|
---|
705 | #define CR_DOUBLE_BIT 0x20
|
---|
706 | #define CR_STEREO_BIT 0x40
|
---|
707 | #define CR_MULTISAMPLE_BIT 0x80
|
---|
708 | #define CR_OVERLAY_BIT 0x100
|
---|
709 | #define CR_PBUFFER_BIT 0x200
|
---|
710 | #define CR_ALL_BITS 0x3ff
|
---|
711 |
|
---|
712 |
|
---|
713 | /* Accepted by crSwapBuffers() flag parameter */
|
---|
714 | #define CR_SUPPRESS_SWAP_BIT 0x1
|
---|
715 |
|
---|
716 |
|
---|
717 | typedef GLint (APIENTRY *crCreateContextProc)(const char *dpyName, GLint visBits);
|
---|
718 | typedef void (APIENTRY *crDestroyContextProc)(GLint context);
|
---|
719 | typedef void (APIENTRY *crMakeCurrentProc)(GLint window, GLint context);
|
---|
720 | typedef GLint (APIENTRY *crGetCurrentContextProc)(void);
|
---|
721 | typedef GLint (APIENTRY *crGetCurrentWindowProc)(void);
|
---|
722 | typedef void (APIENTRY *crSwapBuffersProc)(GLint window, GLint flags);
|
---|
723 |
|
---|
724 | typedef GLint (APIENTRY *crWindowCreateProc)(const char *dpyName, GLint visBits);
|
---|
725 | typedef void (APIENTRY *crWindowDestroyProc)(GLint window);
|
---|
726 | typedef void (APIENTRY *crWindowSizeProc)(GLint window, GLint w, GLint h);
|
---|
727 | typedef void (APIENTRY *crWindowPositionProc)(GLint window, GLint x, GLint y);
|
---|
728 | typedef void (APIENTRY *crWindowShowProc)( GLint window, GLint flag );
|
---|
729 |
|
---|
730 | extern GLint APIENTRY crCreateContext(const char *dpyName, GLint visBits);
|
---|
731 | extern void APIENTRY crDestroyContext(GLint context);
|
---|
732 | extern void APIENTRY crMakeCurrent(GLint window, GLint context);
|
---|
733 | extern GLint APIENTRY crGetCurrentContext(void);
|
---|
734 | extern GLint APIENTRY crGetCurrentWindow(void);
|
---|
735 | extern void APIENTRY crSwapBuffers(GLint window, GLint flags);
|
---|
736 | extern GLint APIENTRY crWindowCreate(const char *dpyName, GLint visBits);
|
---|
737 | extern void APIENTRY crWindowDestroy(GLint window);
|
---|
738 | extern void APIENTRY crWindowSize(GLint window, GLint w, GLint h);
|
---|
739 | extern void APIENTRY crWindowPosition(GLint window, GLint x, GLint y);
|
---|
740 | extern void APIENTRY crWindowVisibleRegion( GLint window, GLint cRects, void *pRects );
|
---|
741 | extern void APIENTRY crWindowShow( GLint window, GLint flag );
|
---|
742 |
|
---|
743 | typedef int (CR_APIENTRY *CR_PROC)();
|
---|
744 | CR_PROC APIENTRY crGetProcAddress( const char *name );
|
---|
745 |
|
---|
746 |
|
---|
747 |
|
---|
748 | /**********************************************************************/
|
---|
749 | /***** Other useful stuff *****/
|
---|
750 | /**********************************************************************/
|
---|
751 |
|
---|
752 | #ifdef WINDOWS
|
---|
753 | #define GET_PROC(NAME) wglGetProcAddress((const GLbyte *) (NAME))
|
---|
754 | #elif defined(DARWIN)
|
---|
755 | #define GET_PROC(NAME) NULL
|
---|
756 | #elif defined(GLX_ARB_get_proc_address)
|
---|
757 | #define GET_PROC(NAME) glXGetProcAddressARB((const GLubyte *) (NAME))
|
---|
758 | #else
|
---|
759 | /* For SGI, etc that don't have glXGetProcAddress(). */
|
---|
760 | #define GET_PROC(NAME) NULL
|
---|
761 | #endif
|
---|
762 |
|
---|
763 | #ifdef __cplusplus
|
---|
764 | }
|
---|
765 | #endif
|
---|
766 |
|
---|
767 | #endif /* __CHROMIUM_H__ */
|
---|