VirtualBox

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

Last change on this file since 62782 was 62782, checked in by vboxsync, 9 years ago

HostServices,GuestHost: warnings

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