VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/glext.cpp@ 3468

Last change on this file since 3468 was 3468, checked in by vboxsync, 18 years ago

Extension detection updates

File size: 4.3 KB
Line 
1/** @file
2 *
3 * VirtualBox Windows NT/2000/XP guest OpenGL ICD
4 *
5 * OpenGL extensions
6 *
7 * References: http://oss.sgi.com/projects/ogl-sample/registry/
8 * http://icps.u-strasbg.fr/~marchesin/perso/extensions/
9 *
10 * Copyright (C) 2006-2007 innotek GmbH
11 *
12 * This file is part of VirtualBox Open Source Edition (OSE), as
13 * available from http://www.virtualbox.org. This file is free software;
14 * you can redistribute it and/or modify it under the terms of the GNU
15 * General Public License as published by the Free Software Foundation,
16 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
17 * distribution. VirtualBox OSE is distributed in the hope that it will
18 * be useful, but WITHOUT ANY WARRANTY of any kind.
19 *
20 * If you received this file as part of a commercial VirtualBox
21 * distribution, then only the terms of your commercial VirtualBox
22 * license agreement apply instead of the previous paragraph.
23 *
24 */
25
26#define VBOX_OGL_WITH_EXTENSION_ARRAY
27#include "VBoxOGL.h"
28
29
30int vboxInitOpenGLExtensions()
31{
32 const GLubyte *pszExtensions = glGetString(GL_EXTENSIONS);
33 static bool fInitialized = false;
34
35 if (fInitialized)
36 return VINF_SUCCESS;
37
38 for (int i=0;i<RT_ELEMENTS(OpenGLExtensions);i++)
39 {
40 if (strstr((char *)pszExtensions, OpenGLExtensions[i].pszExtName))
41 OpenGLExtensions[i].fAvailable = VBoxIsExtensionAvailable(OpenGLExtensions[i].pszExtFunctionName);
42 }
43 fInitialized = true;
44 return VINF_SUCCESS;
45}
46
47
48PROC APIENTRY DrvGetProcAddress(LPCSTR lpszProc)
49{
50 PROC pfnProc = NULL;
51
52 for (int i=0;i<RT_ELEMENTS(OpenGLExtensions);i++)
53 {
54 if ( OpenGLExtensions[i].fAvailable
55 && !strcmp(OpenGLExtensions[i].pszExtFunctionName, lpszProc))
56 {
57 pfnProc = (PROC)OpenGLExtensions[i].pfnFunction;
58 }
59 }
60 if (pfnProc == NULL)
61 DbgPrintf(("DrvGetProcAddress %s FAILED\n", lpszProc));
62 else
63 DbgPrintf(("DrvGetProcAddress %s\n", lpszProc));
64
65 return pfnProc;
66}
67
68BOOL WINAPI wglSwapIntervalEXT(int interval)
69{
70 VBOX_OGL_GEN_SYNC_OP1_RET(BOOL, wglSwapIntervalEXT, interval);
71 return retval;
72}
73
74int WINAPI wglGetSwapIntervalEXT(void)
75{
76 VBOX_OGL_GEN_SYNC_OP_RET(int, wglGetSwapIntervalEXT);
77 return retval;
78}
79
80
81
82
83
84#if 0
85 GL_ARB_multitexture
86 GL_EXT_texture_env_add
87 GL_EXT_compiled_vertex_array
88 GL_S3_s3tc
89 GL_ARB_occlusion_query
90 GL_ARB_point_parameters
91 GL_ARB_texture_border_clamp
92 GL_ARB_texture_compression
93 GL_ARB_texture_cube_map
94 GL_ARB_texture_env_add
95 GL_ARB_texture_env_combine
96 GL_ARB_texture_env_crossbar
97 GL_ARB_texture_env_dot3
98 GL_ARB_texture_mirrored_repeat
99 GL_ARB_transpose_matrix
100 GL_ARB_vertex_blend
101 GL_ARB_vertex_buffer_object
102 GL_ARB_vertex_program
103 GL_ARB_window_pos
104 GL_ATI_element_array
105 GL_ATI_envmap_bumpmap
106 GL_ATI_fragment_shader
107 GL_ATI_map_object_buffer
108 GL_ATI_texture_env_combine3
109 GL_ATI_texture_mirror_once
110 GL_ATI_vertex_array_object
111 GL_ATI_vertex_attrib_array_object
112 GL_ATI_vertex_streams
113 GL_ATIX_texture_env_combine3
114 GL_ATIX_texture_env_route
115 GL_ATIX_vertex_shader_output_point_size
116 GL_EXT_abgr
117 GL_EXT_bgra
118 GL_EXT_blend_color
119 GL_EXT_blend_func_separate
120 GL_EXT_blend_minmax
121 GL_EXT_blend_subtract
122 GL_EXT_clip_volume_hint
123 GL_EXT_draw_range_elements
124 GL_EXT_fog_coord
125 GL_EXT_multi_draw_arrays
126 GL_EXT_packed_pixels
127 GL_EXT_point_parameters
128 GL_EXT_polygon_offset
129 GL_EXT_rescale_normal
130 GL_EXT_secondary_color
131 GL_EXT_separate_specular_color
132 GL_EXT_stencil_wrap
133 GL_EXT_texgen_reflection
134 GL_EXT_texture3D
135 GL_EXT_texture_compression_s3tc
136 GL_EXT_texture_cube_map
137 GL_EXT_texture_edge_clamp
138 GL_EXT_texture_env_combine
139 GL_EXT_texture_env_dot3
140 GL_EXT_texture_filter_anisotropic
141 GL_EXT_texture_lod_bias
142 GL_EXT_texture_mirror_clamp
143 GL_EXT_texture_object
144 GL_EXT_texture_rectangle
145 GL_EXT_vertex_array
146 GL_EXT_vertex_shader
147 GL_HP_occlusion_test
148 GL_KTX_buffer_region
149 GL_NV_blend_square
150 GL_NV_occlusion_query
151 GL_NV_texgen_reflection
152 GL_SGI_color_matrix
153 GL_SGIS_generate_mipmap
154 GL_SGIS_multitexture
155 GL_SGIS_texture_border_clamp
156 GL_SGIS_texture_edge_clamp
157 GL_SGIS_texture_lod
158 GL_SUN_multi_draw_arrays
159 GL_WIN_swap_hint
160 WGL_EXT_extensions_string
161#endif
162
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