meson: Patch SDL3 wrap to include OpenGL support on Windows

This commit is contained in:
Matt Borgerson
2026-01-21 17:20:14 -07:00
committed by mborgerson
parent b3d23df28b
commit e13ff95c7a
2 changed files with 29 additions and 0 deletions
@@ -0,0 +1,28 @@
diff --git a/meson.build b/meson.build
index 1111111..2222222 100644
--- a/meson.build
+++ b/meson.build
@@ -372,6 +372,11 @@ elif host_machine.system() == 'windows'
cdata.set('SDL_GPU_D3D12', 1)
cdata.set('SDL_VIDEO_VULKAN', 1)
cdata.set('SDL_VIDEO_RENDER_VULKAN', 1)
+ # OpenGL support
+ cdata.set('SDL_VIDEO_OPENGL', 1)
+ cdata.set('SDL_VIDEO_OPENGL_WGL', 1)
+ cdata.set('SDL_VIDEO_RENDER_OGL', 1)
+ sdl_deps += cc.find_library('opengl32')
if have_xinput_header
cdata.set('SDL_JOYSTICK_XINPUT', 1)
diff --git a/src/render/meson.build b/src/render/meson.build
index 3333333..4444444 100644
--- a/src/render/meson.build
+++ b/src/render/meson.build
@@ -3,6 +3,7 @@ subdir('software')
if host_machine.system() == 'windows'
subdir('direct3d12')
+ subdir('opengl')
subdir('vulkan')
elif host_machine.system() == 'darwin'
subdir('metal')
+1
View File
@@ -9,6 +9,7 @@ patch_url = https://wrapdb.mesonbuild.com/v2/sdl3_3.4.0-1/get_patch
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl3_3.4.0-1/sdl3_3.4.0-1_patch.zip
patch_hash = 119f82372d97114b8aa044f2a19cae5450b1891db7bb3b6dedeac4ab0579dfb5
wrapdb_version = 3.4.0-1
diff_files = sdl3/windows-opengl-support.patch
[provide]
dependency_names = sdl3