1. yotis
  2. glxx

Commits

yotis  committed 2830b5a

Fixed issue #1, updated gl specs (added new extensions)

  • Participants
  • Parent commits e0c03ea
  • Branches default

Comments (0)

Files changed (10)

File generator/glxx.py

View file
  • Ignore whitespace
 #endif
 #define __gl_h__
 #define __GL_H__
+#ifndef APIENTRY
 #define APIENTRY __stdcall
+#endif
 #endif // _WIN32
 
 // suppress linux header
 ''')
         h_out.write('\n' + gl_spec_header_passthru + '\n')
         h_out.write('\n' + enum_ext_text + '\n')
-        h_out.write(
-'''
+        h_out.write('''
 
 #include <cassert>
 
     bool IsExtensionSupported(const char* extension);
 ''')
         h_out.write(gl_spec_header + '\n')
-        h_out.write(
-'''
+        h_out.write('''
 
 } //namespace glxx
 
             cpp_out.write(' * %s' % ll)
         cpp_out.write(' */\n')
         
-        cpp_out.write(
-'''
+        cpp_out.write('''
 #include "glxx.h"
 #include <iostream>
 #include <iterator>

File generator/specs/enumext.spec

View file
  • Ignore whitespace
 # enumext.spec - list of GL enumerants for glext.h header
 #
-# $Revision: 13168 $ on $Date: 2010-12-09 02:18:26 -0800 (Thu, 09 Dec 2010) $
+# $Revision: 14384 $ on $Date: 2011-04-05 23:05:03 -0700 (Tue, 05 Apr 2011) $
 
 # This is derived from the master GL enumerant registry (enum.spec).
 #
 	TEXTURE_SRGB_DECODE_EXT				= 0x8A48
 	DECODE_EXT					= 0x8A49
 	SKIP_DECODE_EXT					= 0x8A4A
+
+
+###############################################################################
+
+# Extension #403
+NV_texture_multisample enum:
+	TEXTURE_COVERAGE_SAMPLES_NV			= 0x9045
+	TEXTURE_COLOR_SAMPLES_NV			= 0x9046
+
+###############################################################################
+
+# Extension #404
+AMD_blend_minmax_factor enum:
+	FACTOR_MIN_AMD					= 0x901C
+	FACTOR_MAX_AMD					= 0x901D
+
+###############################################################################
+
+# Extension #505
+#AMD_sample_positions enum:
+#	 SUBSAMPLE_DISTANCE_AMD				 = 0x883F

File generator/specs/gl.spec

View file
  • Ignore whitespace
 # This document is licensed under the SGI Free Software B License Version
 # 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
 #
-# $Revision: 13168 $ on $Date: 2010-12-09 02:18:26 -0800 (Thu, 09 Dec 2010) $
+# $Revision: 14384 $ on $Date: 2011-04-05 23:05:03 -0700 (Tue, 05 Apr 2011) $
 
 required-props:
 # Description of a parameter
 # Category this function falls in. While there are many categories for
 # early GL 1.0 functions, later functions just have a core version
 # (e.g. VERSION_major_minor) or extension name for the category.
-category:	display-list drawing drawing-control feedback framebuf misc modeling pixel-op pixel-rw state-req xform VERSION_1_0 VERSION_1_0_DEPRECATED VERSION_1_1 VERSION_1_1_DEPRECATED VERSION_1_2 VERSION_1_2_DEPRECATED VERSION_1_3 VERSION_1_3_DEPRECATED VERSION_1_4 VERSION_1_4_DEPRECATED VERSION_1_5 VERSION_2_0 VERSION_2_1 VERSION_3_0 VERSION_3_0_DEPRECATED VERSION_3_1 VERSION_3_2 VERSION_3_3 VERSION_4_0 VERSION_4_1 VERSION_4_1_DEPRECATED ATI_element_array ATI_envmap_bumpmap ATI_fragment_shader ATI_pn_triangles ATI_vertex_array_object ATI_vertex_streams EXT_blend_color EXT_blend_minmax EXT_convolution EXT_copy_texture EXT_histogram EXT_polygon_offset EXT_subtexture EXT_texture3D EXT_texture_object EXT_vertex_array EXT_vertex_shader SGIS_detail_texture SGIS_multisample SGIS_pixel_texture ARB_point_parameters EXT_point_parameters SGIS_point_parameters SGIS_sharpen_texture SGIS_texture4D SGIS_texture_filter4 SGIX_async SGIX_flush_raster SGIX_fragment_lighting SGIX_framezoom SGIX_igloo_interface SGIX_instruments SGIX_list_priority SGIX_pixel_texture SGIX_polynomial_ffd SGIX_reference_plane SGIX_sprite SGIX_tag_sample_buffer SGI_color_table ARB_multitexture ARB_multisample ARB_texture_compression ARB_transpose_matrix ARB_vertex_blend ARB_matrix_palette EXT_compiled_vertex_array EXT_cull_vertex EXT_index_func EXT_index_material EXT_draw_range_elements EXT_vertex_weighting INGR_blend_func_separate NV_evaluators NV_fence NV_occlusion_query NV_point_sprite NV_register_combiners NV_register_combiners2 NV_vertex_array_range NV_vertex_program NV_vertex_program1_1_dcc MESA_resize_buffers MESA_window_pos PGI_misc_hints EXT_fog_coord EXT_blend_func_separate EXT_color_subtable EXT_coordinate_frame EXT_light_texture EXT_multi_draw_arrays EXT_paletted_texture EXT_pixel_transform EXT_secondary_color EXT_texture_perturb_normal HP_image_transform IBM_multimode_draw_arrays IBM_vertex_array_lists INTEL_parallel_arrays SUNX_constant_data SUN_global_alpha SUN_mesh_array SUN_triangle_list SUN_vertex 3DFX_tbuffer EXT_multisample SGIS_fog_function SGIS_texture_color_mask ARB_window_pos EXT_stencil_two_side EXT_depth_bounds_test EXT_blend_equation_separate ARB_vertex_program ARB_fragment_program ARB_vertex_buffer_object ARB_occlusion_query ARB_shader_objects ARB_vertex_shader ARB_fragment_shader S3_s3tc ATI_draw_buffers ATI_texture_env_combine3 ATI_texture_float NV_float_buffer NV_fragment_program NV_half_float NV_pixel_data_range NV_primitive_restart NV_texture_expand_normal NV_texture_expand_normal NV_vertex_program2 APPLE_element_array APPLE_fence APPLE_vertex_array_object APPLE_vertex_array_range ATI_draw_buffers NV_fragment_program NV_half_float NV_pixel_data_range NV_primitive_restart ATI_map_object_buffer ATI_separate_stencil ATI_vertex_attrib_array_object ARB_draw_buffers ARB_texture_rectangle ARB_color_buffer_float EXT_framebuffer_object GREMEDY_string_marker EXT_stencil_clear_tag EXT_framebuffer_blit EXT_framebuffer_multisample MESAX_texture_stack EXT_timer_query EXT_gpu_program_parameters APPLE_flush_buffer_range NV_gpu_program4 NV_geometry_program4 EXT_geometry_shader4 NV_vertex_program4 EXT_gpu_shader4 EXT_draw_instanced EXT_texture_buffer_object NV_depth_buffer_float NV_framebuffer_multisample_coverage NV_parameter_buffer_object EXT_draw_buffers2 NV_transform_feedback EXT_bindable_uniform EXT_texture_integer GREMEDY_frame_terminator NV_conditional_render NV_present_video EXT_transform_feedback ARB_depth_buffer_float ARB_draw_instanced ARB_framebuffer_object ARB_framebuffer_sRGB ARB_geometry_shader4 ARB_half_float_vertex ARB_instanced_arrays ARB_map_buffer_range ARB_texture_buffer_object ARB_texture_compression_rgtc ARB_texture_rg ARB_vertex_array_object EXT_direct_state_access EXT_vertex_array_bgra EXT_texture_swizzle NV_explicit_multisample NV_transform_feedback2 ATI_meminfo AMD_performance_monitor AMD_vertex_shader_tesselator EXT_provoking_vertex ARB_uniform_buffer_object ARB_copy_buffer EXT_texture_snorm AMD_draw_buffers_blend APPLE_texture_range APPLE_float_pixels APPLE_vertex_program_evaluators APPLE_aux_depth_stencil APPLE_object_purgeable APPLE_row_bytes ARB_draw_elements_base_vertex ARB_provoking_vertex ARB_sync ARB_texture_multisample ARB_draw_buffers_blend ARB_sample_shading NV_video_capture NV_copy_image EXT_separate_shader_objects NV_parameter_buffer_object2 NV_shader_buffer_load NV_vertex_buffer_unified_memory NV_texture_barrier ARB_shading_language_include ARB_blend_func_extended ARB_sampler_objects ARB_timer_query ARB_vertex_type_2_10_10_10_rev ARB_draw_indirect ARB_gpu_shader_fp64 ARB_shader_subroutine ARB_tessellation_shader ARB_transform_feedback2 ARB_transform_feedback3 AMD_conservative_depth NV_vdpau_interop ARB_ES2_compatibility ARB_get_program_binary ARB_separate_shader_objects ARB_vertex_attrib_64bit ARB_viewport_array ARB_cl_event ARB_debug_output ARB_robustness EXT_shader_image_load_store EXT_vertex_attrib_64bit NV_gpu_shader5 NV_vertex_attrib_integer_64bit AMD_name_gen_delete AMD_debug_output NV_vdpau_interop NV_gpu_program5
+category:	display-list drawing drawing-control feedback framebuf misc modeling pixel-op pixel-rw state-req xform VERSION_1_0 VERSION_1_0_DEPRECATED VERSION_1_1 VERSION_1_1_DEPRECATED VERSION_1_2 VERSION_1_2_DEPRECATED VERSION_1_3 VERSION_1_3_DEPRECATED VERSION_1_4 VERSION_1_4_DEPRECATED VERSION_1_5 VERSION_2_0 VERSION_2_1 VERSION_3_0 VERSION_3_0_DEPRECATED VERSION_3_1 VERSION_3_2 VERSION_3_3 VERSION_4_0 VERSION_4_1 VERSION_4_1_DEPRECATED ATI_element_array ATI_envmap_bumpmap ATI_fragment_shader ATI_pn_triangles ATI_vertex_array_object ATI_vertex_streams EXT_blend_color EXT_blend_minmax EXT_convolution EXT_copy_texture EXT_histogram EXT_polygon_offset EXT_subtexture EXT_texture3D EXT_texture_object EXT_vertex_array EXT_vertex_shader SGIS_detail_texture SGIS_multisample SGIS_pixel_texture ARB_point_parameters EXT_point_parameters SGIS_point_parameters SGIS_sharpen_texture SGIS_texture4D SGIS_texture_filter4 SGIX_async SGIX_flush_raster SGIX_fragment_lighting SGIX_framezoom SGIX_igloo_interface SGIX_instruments SGIX_list_priority SGIX_pixel_texture SGIX_polynomial_ffd SGIX_reference_plane SGIX_sprite SGIX_tag_sample_buffer SGI_color_table ARB_multitexture ARB_multisample ARB_texture_compression ARB_transpose_matrix ARB_vertex_blend ARB_matrix_palette EXT_compiled_vertex_array EXT_cull_vertex EXT_index_func EXT_index_material EXT_draw_range_elements EXT_vertex_weighting INGR_blend_func_separate NV_evaluators NV_fence NV_occlusion_query NV_point_sprite NV_register_combiners NV_register_combiners2 NV_vertex_array_range NV_vertex_program NV_vertex_program1_1_dcc MESA_resize_buffers MESA_window_pos PGI_misc_hints EXT_fog_coord EXT_blend_func_separate EXT_color_subtable EXT_coordinate_frame EXT_light_texture EXT_multi_draw_arrays EXT_paletted_texture EXT_pixel_transform EXT_secondary_color EXT_texture_perturb_normal HP_image_transform IBM_multimode_draw_arrays IBM_vertex_array_lists INTEL_parallel_arrays SUNX_constant_data SUN_global_alpha SUN_mesh_array SUN_triangle_list SUN_vertex 3DFX_tbuffer EXT_multisample SGIS_fog_function SGIS_texture_color_mask ARB_window_pos EXT_stencil_two_side EXT_depth_bounds_test EXT_blend_equation_separate ARB_vertex_program ARB_fragment_program ARB_vertex_buffer_object ARB_occlusion_query ARB_shader_objects ARB_vertex_shader ARB_fragment_shader S3_s3tc ATI_draw_buffers ATI_texture_env_combine3 ATI_texture_float NV_float_buffer NV_fragment_program NV_half_float NV_pixel_data_range NV_primitive_restart NV_texture_expand_normal NV_texture_expand_normal NV_vertex_program2 APPLE_element_array APPLE_fence APPLE_vertex_array_object APPLE_vertex_array_range ATI_draw_buffers NV_fragment_program NV_half_float NV_pixel_data_range NV_primitive_restart ATI_map_object_buffer ATI_separate_stencil ATI_vertex_attrib_array_object ARB_draw_buffers ARB_texture_rectangle ARB_color_buffer_float EXT_framebuffer_object GREMEDY_string_marker EXT_stencil_clear_tag EXT_framebuffer_blit EXT_framebuffer_multisample MESAX_texture_stack EXT_timer_query EXT_gpu_program_parameters APPLE_flush_buffer_range NV_gpu_program4 NV_geometry_program4 EXT_geometry_shader4 NV_vertex_program4 EXT_gpu_shader4 EXT_draw_instanced EXT_texture_buffer_object NV_depth_buffer_float NV_framebuffer_multisample_coverage NV_parameter_buffer_object EXT_draw_buffers2 NV_transform_feedback EXT_bindable_uniform EXT_texture_integer GREMEDY_frame_terminator NV_conditional_render NV_present_video EXT_transform_feedback ARB_depth_buffer_float ARB_draw_instanced ARB_framebuffer_object ARB_framebuffer_sRGB ARB_geometry_shader4 ARB_half_float_vertex ARB_instanced_arrays ARB_map_buffer_range ARB_texture_buffer_object ARB_texture_compression_rgtc ARB_texture_rg ARB_vertex_array_object EXT_direct_state_access EXT_vertex_array_bgra EXT_texture_swizzle NV_explicit_multisample NV_transform_feedback2 ATI_meminfo AMD_performance_monitor AMD_vertex_shader_tesselator EXT_provoking_vertex ARB_uniform_buffer_object ARB_copy_buffer EXT_texture_snorm AMD_draw_buffers_blend APPLE_texture_range APPLE_float_pixels APPLE_vertex_program_evaluators APPLE_aux_depth_stencil APPLE_object_purgeable APPLE_row_bytes ARB_draw_elements_base_vertex ARB_provoking_vertex ARB_sync ARB_texture_multisample ARB_draw_buffers_blend ARB_sample_shading NV_video_capture NV_copy_image EXT_separate_shader_objects NV_parameter_buffer_object2 NV_shader_buffer_load NV_vertex_buffer_unified_memory NV_texture_barrier ARB_shading_language_include ARB_blend_func_extended ARB_sampler_objects ARB_timer_query ARB_vertex_type_2_10_10_10_rev ARB_draw_indirect ARB_gpu_shader_fp64 ARB_shader_subroutine ARB_tessellation_shader ARB_transform_feedback2 ARB_transform_feedback3 AMD_conservative_depth NV_vdpau_interop ARB_ES2_compatibility ARB_get_program_binary ARB_separate_shader_objects ARB_vertex_attrib_64bit ARB_viewport_array ARB_cl_event ARB_debug_output ARB_robustness EXT_shader_image_load_store EXT_vertex_attrib_64bit NV_gpu_shader5 NV_vertex_attrib_integer_64bit AMD_name_gen_delete AMD_debug_output NV_vdpau_interop NV_gpu_program5 NV_texture_multisample
 
 # Categories for extensions with no functions - need not be included now
 # ARB_texture_env_add ARB_texture_cube_map ARB_texture_border_clamp
 # ARB_seamless_cube_map ARB_vertex_array_bgra ARB_texture_cube_map_array
 # ARB_texture_gather ARB_texture_query_lod
 # AMD_shader_stencil_export AMD_seamless_cubemap_per_texture
+# AMD_blend_minmax_factor commands
 
 # Core version in which a function was introduced, or against
 # which an extension can be implemented
 # (none)
 newcategory: EXT_texture_sRGB_decode
 
+###############################################################################
+#
+# Extension #403
+# NV_texture_multisample commands
+#
+###############################################################################
+
+TexImage2DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations)
+	return		void
+	param		target		GLenum in value
+	param		coverageSamples SizeI in value
+	param		colorSamples	SizeI in value
+	param		internalFormat	Int32 in value
+	param		width		SizeI in value
+	param		height		SizeI in value
+	param		fixedSampleLocations	Boolean in value
+	category	NV_texture_multisample
+	version		4.1
+	extension
+	glxropcode	?
+	glxflags	ignore
+	offset		?
+
+TexImage3DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations)
+	return		void
+	param		target		GLenum in value
+	param		coverageSamples SizeI in value
+	param		colorSamples	SizeI in value
+	param		internalFormat	Int32 in value
+	param		width		SizeI in value
+	param		height		SizeI in value
+	param		depth		SizeI in value
+	param		fixedSampleLocations	Boolean in value
+	category	NV_texture_multisample
+	version		4.1
+	extension
+	glxropcode	?
+	glxflags	ignore
+	offset		?
+
+TextureImage2DMultisampleNV(texture, target, samples, internalFormat, width, height, fixedSampleLocations)
+	return		void
+	param		texture		UInt32 in value
+	param		target		GLenum in value
+	param		samples		SizeI in value
+	param		internalFormat	Int32 in value
+	param		width		SizeI in value
+	param		height		SizeI in value
+	param		fixedSampleLocations	Boolean in value
+	category	NV_texture_multisample
+	version		4.1
+	extension
+	glxropcode	?
+	glxflags	ignore
+	offset		?
+
+TextureImage3DMultisampleNV(texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations)
+	return		void
+	param		texture		UInt32 in value
+	param		target		GLenum in value
+	param		samples		SizeI in value
+	param		internalFormat	Int32 in value
+	param		width		SizeI in value
+	param		height		SizeI in value
+	param		depth		SizeI in value
+	param		fixedSampleLocations	Boolean in value
+	category	NV_texture_multisample
+	version		4.1
+	extension
+	glxropcode	?
+	glxflags	ignore
+	offset		?
+
+TextureImage2DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations)
+	return		void
+	param		texture		UInt32 in value
+	param		target		GLenum in value
+	param		coverageSamples SizeI in value
+	param		colorSamples	SizeI in value
+	param		internalFormat	Int32 in value
+	param		width		SizeI in value
+	param		height		SizeI in value
+	param		fixedSampleLocations	Boolean in value
+	category	NV_texture_multisample
+	version		4.1
+	extension
+	glxropcode	?
+	glxflags	ignore
+	offset		?
+
+TextureImage3DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations)
+	return		void
+	param		texture		UInt32 in value
+	param		target		GLenum in value
+	param		coverageSamples SizeI in value
+	param		colorSamples	SizeI in value
+	param		internalFormat	Int32 in value
+	param		width		SizeI in value
+	param		height		SizeI in value
+	param		depth		SizeI in value
+	param		fixedSampleLocations	Boolean in value
+	category	NV_texture_multisample
+	version		4.1
+	extension
+	glxropcode	?
+	glxflags	ignore
+	offset		?
+
+
+###############################################################################
+#
+# Extension #404
+# AMD_blend_minmax_factor commands
+#
+###############################################################################
+
+# (none)
+newcategory: AMD_blend_minmax_factor
+
+###############################################################################
+#
+# Extension #405 (awaiting spec clarification)
+# AMD_sample_positions commands
+#
+###############################################################################
+
+#@GL_AMD_sample_positions
+#@void SetMultisamplefv(enum pname, uint index, const float *val);

File generator/specs/wglenumext.spec

View file
  • Ignore whitespace
 
 passthru:
 passthru: /* Header file version number */
-passthru: /* wglext.h last updated 2010/08/06 */
+passthru: /* wglext.h last updated 2011/04/13 */
 passthru: /* Current version at http://www.opengl.org/registry/ */
-passthru: #define WGL_WGLEXT_VERSION 22
+passthru: #define WGL_WGLEXT_VERSION 23
 
 ###############################################################################
 #
 # All values are shared with GLX and GL
 WGL_EXT_create_context_es2_profile enum:
 	WGL_CONTEXT_ES2_PROFILE_BIT_EXT			= 0x00000004
+
+###############################################################################
+
+# Extension #407
+# Not a bitfield but not from an assigned range, either
+WGL_NV_DX_interop enum:
+	WGL_ACCESS_READ_ONLY_NV				= 0x00000000
+	WGL_ACCESS_READ_WRITE_NV			= 0x00000001
+	WGL_ACCESS_WRITE_DISCARD_NV			= 0x00000002
+

File generator/specs/wglext.spec

View file
  • Ignore whitespace
 
 required-props:
 param:		retval retained
-category:	wgl ARB_buffer_region ARB_extensions_string ARB_pixel_format ARB_make_current_read ARB_pbuffer ARB_render_texture ARB_pixel_format_float EXT_display_color_table EXT_extensions_string EXT_make_current_read EXT_pbuffer EXT_pixel_format EXT_swap_control OML_sync_control I3D_digital_video_control I3D_gamma I3D_genlock I3D_image_buffer I3D_swap_frame_lock I3D_swap_frame_usage NV_vertex_array_range 3DL_stereo_control NV_swap_group NV_video_output NV_present_video ARB_create_context NV_gpu_affinity AMD_gpu_association NV_video_capture NV_copy_image ARB_framebuffer_sRGB
+category:	wgl ARB_buffer_region ARB_extensions_string ARB_pixel_format ARB_make_current_read ARB_pbuffer ARB_render_texture ARB_pixel_format_float EXT_display_color_table EXT_extensions_string EXT_make_current_read EXT_pbuffer EXT_pixel_format EXT_swap_control OML_sync_control I3D_digital_video_control I3D_gamma I3D_genlock I3D_image_buffer I3D_swap_frame_lock I3D_swap_frame_usage NV_vertex_array_range 3DL_stereo_control NV_swap_group NV_video_output NV_present_video ARB_create_context NV_gpu_affinity AMD_gpu_association NV_video_capture NV_copy_image ARB_framebuffer_sRGB NV_DX_interop
 # required-props in wgl.spec (which is not used for anything):
 # dlflags:	  notlistable handcode
 # wglflags:	  client-handcode server-handcode non-dispatch
 
 # (none)
 newcategory: NV_multisample_coverage
+
+###############################################################################
+#
+# Extension #407
+# NV_DX_interop commands
+#
+###############################################################################
+
+DXSetResourceShareHandleNV(dxObject, shareHandle)
+	return		BOOL
+	param		dxObject	void out array [1]
+	param		shareHandle	HANDLE in value
+	category	NV_DX_interop
+
+DXOpenDeviceNV(dxDevice)
+	return		HANDLE
+	param		dxDevice	void out array [1]
+	category	NV_DX_interop
+
+DXCloseDeviceNV(hDevice)
+	return		BOOL
+	param		hDevice		HANDLE in value
+	category	NV_DX_interop
+
+DXRegisterObjectNV(hDevice, dxObject, name, type, access)
+	return		HANDLE
+	param		hDevice		HANDLE in value
+	param		dxObject	void out array [1]
+	param		name		GLuint in value
+	param		type		GLenum in value
+	param		access		GLenum in value
+	category	NV_DX_interop
+
+DXUnregisterObjectNV(hDevice, hObject)
+	return		BOOL
+	param		hDevice		HANDLE in value
+	param		hObject		HANDLE in value
+	category	NV_DX_interop
+
+DXObjectAccessNV(hObject, access)
+	return		BOOL
+	param		hObject		HANDLE in value
+	param		access		GLenum in value
+	category	NV_DX_interop
+
+DXLockObjectsNV(hDevice, count, hObjects)
+	return		BOOL
+	param		hDevice		HANDLE in value
+	param		count		GLint in value
+	param		hObjects	HANDLE out array [count]
+	category	NV_DX_interop
+
+DXUnlockObjectsNV(hDevice, count, hObjects)
+	return		BOOL
+	param		hDevice		HANDLE in value
+	param		count		GLint in value
+	param		hObjects	HANDLE out array [count]
+	category	NV_DX_interop
+

File glXxx.cpp

View file
  • Ignore whitespace
             return true;
         return false;
     }
-        
+
 
 glx_version_1_3::Loader::Loader() :
         GetFBConfigs(0),

File glxx.cpp

View file
  • Ignore whitespace
 }
 
 
+
+
+gl_nv_texture_multisample::Loader::Loader() :
+        TexImage2DMultisampleCoverageNV(0),
+        TexImage3DMultisampleCoverageNV(0),
+        TextureImage2DMultisampleNV(0),
+        TextureImage3DMultisampleNV(0),
+        TextureImage2DMultisampleCoverageNV(0),
+        TextureImage3DMultisampleCoverageNV(0),
+        is_loaded(true)
+{
+    assert(GetCurrentCtx() && "gl_nv_texture_multisample::Loader initialized without a current context");
+
+    TexImage2DMultisampleCoverageNV = (PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) GetProcAddr("glTexImage2DMultisampleCoverageNV");
+    if (!TexImage2DMultisampleCoverageNV)
+        is_loaded = false;
+
+    TexImage3DMultisampleCoverageNV = (PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) GetProcAddr("glTexImage3DMultisampleCoverageNV");
+    if (!TexImage3DMultisampleCoverageNV)
+        is_loaded = false;
+
+    TextureImage2DMultisampleNV = (PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) GetProcAddr("glTextureImage2DMultisampleNV");
+    if (!TextureImage2DMultisampleNV)
+        is_loaded = false;
+
+    TextureImage3DMultisampleNV = (PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) GetProcAddr("glTextureImage3DMultisampleNV");
+    if (!TextureImage3DMultisampleNV)
+        is_loaded = false;
+
+    TextureImage2DMultisampleCoverageNV = (PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) GetProcAddr("glTextureImage2DMultisampleCoverageNV");
+    if (!TextureImage2DMultisampleCoverageNV)
+        is_loaded = false;
+
+    TextureImage3DMultisampleCoverageNV = (PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) GetProcAddr("glTextureImage3DMultisampleCoverageNV");
+    if (!TextureImage3DMultisampleCoverageNV)
+        is_loaded = false;
+}
+
+bool has_nv_texture_multisample() 
+{
+    return IsExtensionSupported("GL_NV_texture_multisample");
+}
+
+
+gl_nv_texture_multisample::Loader* default_nv_texture_multisample_loader = 0;
+
+bool load_nv_texture_multisample() 
+{
+    if (default_nv_texture_multisample_loader)
+        delete default_nv_texture_multisample_loader;
+    default_nv_texture_multisample_loader = new gl_nv_texture_multisample::Loader();
+    return default_nv_texture_multisample_loader->isLoaded();
+}
+
+
+void gl_nv_texture_multisample::glTexImage2DMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations)
+{
+    default_nv_texture_multisample_loader->TexImage2DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations);
+}
+
+void gl_nv_texture_multisample::glTexImage3DMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations)
+{
+    default_nv_texture_multisample_loader->TexImage3DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations);
+}
+
+void gl_nv_texture_multisample::glTextureImage2DMultisampleNV(GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations)
+{
+    default_nv_texture_multisample_loader->TextureImage2DMultisampleNV(texture, target, samples, internalFormat, width, height, fixedSampleLocations);
+}
+
+void gl_nv_texture_multisample::glTextureImage3DMultisampleNV(GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations)
+{
+    default_nv_texture_multisample_loader->TextureImage3DMultisampleNV(texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations);
+}
+
+void gl_nv_texture_multisample::glTextureImage2DMultisampleCoverageNV(GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations)
+{
+    default_nv_texture_multisample_loader->TextureImage2DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations);
+}
+
+void gl_nv_texture_multisample::glTextureImage3DMultisampleCoverageNV(GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations)
+{
+    default_nv_texture_multisample_loader->TextureImage3DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations);
+}
+
+
+
+gl_amd_blend_minmax_factor::Loader::Loader() :
+        is_loaded(true)
+{
+    assert(GetCurrentCtx() && "gl_amd_blend_minmax_factor::Loader initialized without a current context");
+}
+
+bool has_amd_blend_minmax_factor() 
+{
+    return IsExtensionSupported("GL_AMD_blend_minmax_factor");
+}
+
+
+gl_amd_blend_minmax_factor::Loader* default_amd_blend_minmax_factor_loader = 0;
+
+bool load_amd_blend_minmax_factor() 
+{
+    if (default_amd_blend_minmax_factor_loader)
+        delete default_amd_blend_minmax_factor_loader;
+    default_amd_blend_minmax_factor_loader = new gl_amd_blend_minmax_factor::Loader();
+    return default_amd_blend_minmax_factor_loader->isLoaded();
+}
+
+
 } // namespace glxx

File glxx.h

View file
  • Ignore whitespace
 #endif
 #define __gl_h__
 #define __GL_H__
+#ifndef APIENTRY
 #define APIENTRY __stdcall
+#endif
 #endif // _WIN32
 
 // suppress linux header
 #define GL_SKIP_DECODE_EXT                               0x8A4A
 #endif
 
+#ifndef GL_NV_texture_multisample
+#define GL_TEXTURE_COVERAGE_SAMPLES_NV                   0x9045
+#define GL_TEXTURE_COLOR_SAMPLES_NV                      0x9046
+#endif
+
+#ifndef GL_AMD_blend_minmax_factor
+#define GL_FACTOR_MIN_AMD                                0x901C
+#define GL_FACTOR_MAX_AMD                                0x901D
+#endif
+
 
 
 #include <cassert>
 #endif
 
 
+#ifndef GL_NV_texture_multisample
+
+    bool has_nv_texture_multisample();
+    namespace gl_nv_texture_multisample
+    {
+        typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC)(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+        typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC)(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+        typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC)(GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+        typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC)(GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+        typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC)(GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+        typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC)(GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+
+        class Loader
+        {
+        public:
+            Loader();
+            inline bool isLoaded() const { return is_loaded; }
+            PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC TexImage2DMultisampleCoverageNV;
+            PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC TexImage3DMultisampleCoverageNV;
+            PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC TextureImage2DMultisampleNV;
+            PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC TextureImage3DMultisampleNV;
+            PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC TextureImage2DMultisampleCoverageNV;
+            PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC TextureImage3DMultisampleCoverageNV;
+
+        private:
+            bool is_loaded;
+        };
+
+        void glTexImage2DMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+        void glTexImage3DMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+        void glTextureImage2DMultisampleNV(GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+        void glTextureImage3DMultisampleNV(GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+        void glTextureImage2DMultisampleCoverageNV(GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+        void glTextureImage3DMultisampleCoverageNV(GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+
+    } // namespace gl_nv_texture_multisample
+
+    bool load_nv_texture_multisample();
+
+#define GL_NV_texture_multisample
+#endif
+
+
+#ifndef GL_AMD_blend_minmax_factor
+
+    bool has_amd_blend_minmax_factor();
+    namespace gl_amd_blend_minmax_factor
+    {
+
+        class Loader
+        {
+        public:
+            Loader();
+            inline bool isLoaded() const { return is_loaded; }
+
+        private:
+            bool is_loaded;
+        };
+
+
+    } // namespace gl_amd_blend_minmax_factor
+
+    bool load_amd_blend_minmax_factor();
+
+#define GL_AMD_blend_minmax_factor
+#endif
+
+
 } //namespace glxx
 
 #if defined(_WIN32) || defined(WIN32)

File wglxx.cpp

View file
  • Ignore whitespace
 }
 
 
+
+
+wgl_nv_dx_interop::Loader::Loader() :
+        DXSetResourceShareHandleNV(0),
+        DXOpenDeviceNV(0),
+        DXCloseDeviceNV(0),
+        DXRegisterObjectNV(0),
+        DXUnregisterObjectNV(0),
+        DXObjectAccessNV(0),
+        DXLockObjectsNV(0),
+        DXUnlockObjectsNV(0),
+        is_loaded(true)
+{
+    assert(GetCurrentCtx() && "wgl_nv_dx_interop::Loader initialized without a current context");
+
+    DXSetResourceShareHandleNV = (PFNWGLDXSETRESOURCESHAREHANDLENVPROC) GetProcAddr("wglDXSetResourceShareHandleNV");
+    if (!DXSetResourceShareHandleNV)
+        is_loaded = false;
+
+    DXOpenDeviceNV = (PFNWGLDXOPENDEVICENVPROC) GetProcAddr("wglDXOpenDeviceNV");
+    if (!DXOpenDeviceNV)
+        is_loaded = false;
+
+    DXCloseDeviceNV = (PFNWGLDXCLOSEDEVICENVPROC) GetProcAddr("wglDXCloseDeviceNV");
+    if (!DXCloseDeviceNV)
+        is_loaded = false;
+
+    DXRegisterObjectNV = (PFNWGLDXREGISTEROBJECTNVPROC) GetProcAddr("wglDXRegisterObjectNV");
+    if (!DXRegisterObjectNV)
+        is_loaded = false;
+
+    DXUnregisterObjectNV = (PFNWGLDXUNREGISTEROBJECTNVPROC) GetProcAddr("wglDXUnregisterObjectNV");
+    if (!DXUnregisterObjectNV)
+        is_loaded = false;
+
+    DXObjectAccessNV = (PFNWGLDXOBJECTACCESSNVPROC) GetProcAddr("wglDXObjectAccessNV");
+    if (!DXObjectAccessNV)
+        is_loaded = false;
+
+    DXLockObjectsNV = (PFNWGLDXLOCKOBJECTSNVPROC) GetProcAddr("wglDXLockObjectsNV");
+    if (!DXLockObjectsNV)
+        is_loaded = false;
+
+    DXUnlockObjectsNV = (PFNWGLDXUNLOCKOBJECTSNVPROC) GetProcAddr("wglDXUnlockObjectsNV");
+    if (!DXUnlockObjectsNV)
+        is_loaded = false;
+}
+
+bool has_nv_dx_interop() 
+{
+    return IsExtensionSupported("WGL_NV_DX_interop");
+}
+
+
+wgl_nv_dx_interop::Loader* default_nv_dx_interop_loader = 0;
+
+bool load_nv_dx_interop() 
+{
+    if (default_nv_dx_interop_loader)
+        delete default_nv_dx_interop_loader;
+    default_nv_dx_interop_loader = new wgl_nv_dx_interop::Loader();
+    return default_nv_dx_interop_loader->isLoaded();
+}
+
+
+BOOL wgl_nv_dx_interop::wglDXSetResourceShareHandleNV(void* dxObject, HANDLE shareHandle)
+{
+    return default_nv_dx_interop_loader->DXSetResourceShareHandleNV(dxObject, shareHandle);
+}
+
+HANDLE wgl_nv_dx_interop::wglDXOpenDeviceNV(void* dxDevice)
+{
+    return default_nv_dx_interop_loader->DXOpenDeviceNV(dxDevice);
+}
+
+BOOL wgl_nv_dx_interop::wglDXCloseDeviceNV(HANDLE hDevice)
+{
+    return default_nv_dx_interop_loader->DXCloseDeviceNV(hDevice);
+}
+
+HANDLE wgl_nv_dx_interop::wglDXRegisterObjectNV(HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access)
+{
+    return default_nv_dx_interop_loader->DXRegisterObjectNV(hDevice, dxObject, name, type, access);
+}
+
+BOOL wgl_nv_dx_interop::wglDXUnregisterObjectNV(HANDLE hDevice, HANDLE hObject)
+{
+    return default_nv_dx_interop_loader->DXUnregisterObjectNV(hDevice, hObject);
+}
+
+BOOL wgl_nv_dx_interop::wglDXObjectAccessNV(HANDLE hObject, GLenum access)
+{
+    return default_nv_dx_interop_loader->DXObjectAccessNV(hObject, access);
+}
+
+BOOL wgl_nv_dx_interop::wglDXLockObjectsNV(HANDLE hDevice, GLint count, HANDLE* hObjects)
+{
+    return default_nv_dx_interop_loader->DXLockObjectsNV(hDevice, count, hObjects);
+}
+
+BOOL wgl_nv_dx_interop::wglDXUnlockObjectsNV(HANDLE hDevice, GLint count, HANDLE* hObjects)
+{
+    return default_nv_dx_interop_loader->DXUnlockObjectsNV(hDevice, count, hObjects);
+}
+
 } // namespace wglxx
 
 

File wglxx.h

View file
  • Ignore whitespace
 #ifndef WGL_EXT_create_context_es2_profile
 #define WGL_CONTEXT_ES2_PROFILE_BIT_EXT               0x00000004
 #endif
+
+#ifndef WGL_NV_DX_interop
+#define WGL_ACCESS_READ_ONLY_NV                       0x00000000
+#define WGL_ACCESS_READ_WRITE_NV                      0x00000001
+#define WGL_ACCESS_WRITE_DISCARD_NV                   0x00000002
+#endif
 #ifndef WGL_ARB_pbuffer
 DECLARE_HANDLE(HPBUFFERARB);
 #endif
 
 #define WGL_NV_multisample_coverage
 #endif
+
+
+#ifndef WGL_NV_DX_interop
+
+    bool has_nv_dx_interop();
+    namespace wgl_nv_dx_interop
+    {
+        typedef BOOL (APIENTRYP PFNWGLDXSETRESOURCESHAREHANDLENVPROC)(void* dxObject, HANDLE shareHandle);
+        typedef HANDLE (APIENTRYP PFNWGLDXOPENDEVICENVPROC)(void* dxDevice);
+        typedef BOOL (APIENTRYP PFNWGLDXCLOSEDEVICENVPROC)(HANDLE hDevice);
+        typedef HANDLE (APIENTRYP PFNWGLDXREGISTEROBJECTNVPROC)(HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
+        typedef BOOL (APIENTRYP PFNWGLDXUNREGISTEROBJECTNVPROC)(HANDLE hDevice, HANDLE hObject);
+        typedef BOOL (APIENTRYP PFNWGLDXOBJECTACCESSNVPROC)(HANDLE hObject, GLenum access);
+        typedef BOOL (APIENTRYP PFNWGLDXLOCKOBJECTSNVPROC)(HANDLE hDevice, GLint count, HANDLE* hObjects);
+        typedef BOOL (APIENTRYP PFNWGLDXUNLOCKOBJECTSNVPROC)(HANDLE hDevice, GLint count, HANDLE* hObjects);
+
+        class Loader
+        {
+        public:
+            Loader();
+            inline bool isLoaded() const { return is_loaded; }
+            PFNWGLDXSETRESOURCESHAREHANDLENVPROC DXSetResourceShareHandleNV;
+            PFNWGLDXOPENDEVICENVPROC DXOpenDeviceNV;
+            PFNWGLDXCLOSEDEVICENVPROC DXCloseDeviceNV;
+            PFNWGLDXREGISTEROBJECTNVPROC DXRegisterObjectNV;
+            PFNWGLDXUNREGISTEROBJECTNVPROC DXUnregisterObjectNV;
+            PFNWGLDXOBJECTACCESSNVPROC DXObjectAccessNV;
+            PFNWGLDXLOCKOBJECTSNVPROC DXLockObjectsNV;
+            PFNWGLDXUNLOCKOBJECTSNVPROC DXUnlockObjectsNV;
+
+        private:
+            bool is_loaded;
+        };
+
+        BOOL wglDXSetResourceShareHandleNV(void* dxObject, HANDLE shareHandle);
+        HANDLE wglDXOpenDeviceNV(void* dxDevice);
+        BOOL wglDXCloseDeviceNV(HANDLE hDevice);
+        HANDLE wglDXRegisterObjectNV(HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
+        BOOL wglDXUnregisterObjectNV(HANDLE hDevice, HANDLE hObject);
+        BOOL wglDXObjectAccessNV(HANDLE hObject, GLenum access);
+        BOOL wglDXLockObjectsNV(HANDLE hDevice, GLint count, HANDLE* hObjects);
+        BOOL wglDXUnlockObjectsNV(HANDLE hDevice, GLint count, HANDLE* hObjects);
+
+    } // namespace wgl_nv_dx_interop
+
+    bool load_nv_dx_interop();
+
+#define WGL_NV_DX_interop
+#endif
 }
 
 #endif // _WIN32