VirtualBox

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

Last change on this file since 74881 was 71930, checked in by vboxsync, 7 years ago

Linux Additions/3D: add symbols needed by Compton in Ubuntu 18.04.
#9162: Fix linking trouble on Ubuntu 18.04 with our GA-provided fake libGL.so
Add additional symbols to try to make the Comptom compositor happy.

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