VirtualBox

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

最後變更 在這個檔案從42590是 42536,由 vboxsync 提交於 12 年 前

crOpenGL/wddm: WOW64 fix

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

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