VirtualBox

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

Last change on this file since 44740 was 44740, checked in by vboxsync, 12 years ago

crOpenGL: OSX backend rework; oddscreen rendering generalization

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

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