VirtualBox

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

最後變更 在這個檔案從71886是 71886,由 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.
Fix a Windows and OS X burn.

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

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