Skip to content

Commit 7e32554

Browse files
committed
Fixed irregular OpenGL registry URLs.
1 parent 471dcde commit 7e32554

22 files changed

+47
-22
lines changed

RegistryProcessor/src/Main.hs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,37 @@ printExtensions api registry = do
122122
else [(ProfileName "core", modSuff)] -- the actual profile doesn't matter
123123
ext = L.intercalate "_" extWords
124124
comment = ["The <https://www.opengl.org/registry/specs/" ++
125-
vendor ++ "/" ++ ext ++ ".txt " ++
125+
fixRegistryPath (vendor ++ "/" ++ ext) ++ ".txt " ++
126126
vendor ++ "_" ++ ext ++ "> extension."]
127127
CM.forM_ profileAndModuleNameSuffix $ \(prof, moduleNameSuffix) ->
128128
printExtension (Just vendor) moduleNameSuffix comment $
129129
executeModifications api prof registry mods
130130

131+
fixRegistryPath :: String -> String
132+
fixRegistryPath path = case path of
133+
"3DFX/multisample" -> "3DFX/3dfx_multisample"
134+
"EXT/debug_label" -> "EXT/EXT_debug_label"
135+
"EXT/debug_marker" -> "EXT/EXT_debug_marker"
136+
"EXT/multisample" -> "EXT/wgl_multisample"
137+
"EXT/texture_cube_map" -> "ARB/texture_cube_map"
138+
"INGR/blend_func_separate" -> "EXT/blend_func_separate"
139+
"KHR/blend_equation_advanced_coherent" -> "KHR/blend_equation_advanced"
140+
"KHR/texture_compression_astc_ldr" -> "KHR/texture_compression_astc_hdr"
141+
"NV/blend_equation_advanced_coherent" -> "NV/blend_equation_advanced"
142+
"NVX/conditional_render" -> "NVX/nvx_conditional_render"
143+
"OES/byte_coordinates" -> "OES/OES_byte_coordinates"
144+
"OES/compressed_paletted_texture" -> "OES/OES_compressed_paletted_texture"
145+
"OES/fixed_point" -> "OES/OES_fixed_point"
146+
"OES/query_matrix" -> "OES/OES_query_matrix"
147+
"OES/read_format" -> "OES/OES_read_format"
148+
"OES/single_precision" -> "OES/OES_single_precision"
149+
"SGIS/fog_function" -> "SGIS/fog_func"
150+
"SGIS/point_parameters" -> "EXT/point_parameters"
151+
"SGIX/fragment_lighting" -> "EXT/fragment_lighting"
152+
"SGIX/pixel_texture" -> "SGIX/sgix_pixel_texture"
153+
"SGIX/texture_add_env" -> "SGIX/texture_env_add"
154+
_ -> path
155+
131156
isProfileDependent :: Modification -> Bool
132157
isProfileDependent = DM.isJust . modificationProfile
133158

src/Graphics/Rendering/OpenGL/Raw/EXT/DebugLabel.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/EXT/debug_label.txt EXT_debug_label> extension.
11+
-- The <https://www.opengl.org/registry/specs/EXT/EXT_debug_label.txt EXT_debug_label> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

src/Graphics/Rendering/OpenGL/Raw/EXT/DebugMarker.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/EXT/debug_marker.txt EXT_debug_marker> extension.
11+
-- The <https://www.opengl.org/registry/specs/EXT/EXT_debug_marker.txt EXT_debug_marker> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

src/Graphics/Rendering/OpenGL/Raw/EXT/Multisample.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/EXT/multisample.txt EXT_multisample> extension.
11+
-- The <https://www.opengl.org/registry/specs/EXT/wgl_multisample.txt EXT_multisample> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

src/Graphics/Rendering/OpenGL/Raw/EXT/TextureCubeMap.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/EXT/texture_cube_map.txt EXT_texture_cube_map> extension.
11+
-- The <https://www.opengl.org/registry/specs/ARB/texture_cube_map.txt EXT_texture_cube_map> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

src/Graphics/Rendering/OpenGL/Raw/INGR/BlendFuncSeparate.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/INGR/blend_func_separate.txt INGR_blend_func_separate> extension.
11+
-- The <https://www.opengl.org/registry/specs/EXT/blend_func_separate.txt INGR_blend_func_separate> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

src/Graphics/Rendering/OpenGL/Raw/KHR/BlendEquationAdvancedCoherent.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/KHR/blend_equation_advanced_coherent.txt KHR_blend_equation_advanced_coherent> extension.
11+
-- The <https://www.opengl.org/registry/specs/KHR/blend_equation_advanced.txt KHR_blend_equation_advanced_coherent> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

src/Graphics/Rendering/OpenGL/Raw/KHR/TextureCompressionASTCLDR.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/KHR/texture_compression_astc_ldr.txt KHR_texture_compression_astc_ldr> extension.
11+
-- The <https://www.opengl.org/registry/specs/KHR/texture_compression_astc_hdr.txt KHR_texture_compression_astc_ldr> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

src/Graphics/Rendering/OpenGL/Raw/NV/BlendEquationAdvancedCoherent.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/NV/blend_equation_advanced_coherent.txt NV_blend_equation_advanced_coherent> extension.
11+
-- The <https://www.opengl.org/registry/specs/NV/blend_equation_advanced.txt NV_blend_equation_advanced_coherent> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

src/Graphics/Rendering/OpenGL/Raw/NVX/ConditionalRender.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- Stability : stable
99
-- Portability : portable
1010
--
11-
-- The <https://www.opengl.org/registry/specs/NVX/conditional_render.txt NVX_conditional_render> extension.
11+
-- The <https://www.opengl.org/registry/specs/NVX/nvx_conditional_render.txt NVX_conditional_render> extension.
1212
--
1313
--------------------------------------------------------------------------------
1414

0 commit comments

Comments
 (0)