VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/chromium.h@ 71880

最後變更 在這個檔案從71880是 71880,由 vboxsync 提交於 7 年 前

Linux Additions/3D: add symbols needed by Mutter in Ubuntu 18.04.
#9162: Fix linking trouble on Ubuntu 18.04 with our GA-provided fake libGL.so
Add some symbols needed by Mutter on Ubuntu 18.04 in a rather hacky way.
All of them are simply renamed versions of symbols that we already provide.
It is not unlikely that we will need to add more in the same way in future.

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette