VirtualBox

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

Last change on this file since 78406 was 78116, checked in by vboxsync, 6 years ago

GuestHost/OpenGL,HostServices/SharedOpenGL: Updates bugref:9407

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