diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index 6ba12a7..6c06a97 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -1427,18 +1427,23 @@ public sealed class GameWindow : IDisposable // foundation is on. Store the BindlessSupport for TextureCache + future // WbDrawDispatcher. Mesh shader load stays as mesh_instanced for now — // Task 10 swaps to mesh_modern after the dispatcher is rewired. - if (AcDream.App.Rendering.Wb.WbFoundationFlag.IsEnabled - && AcDream.App.Rendering.Wb.BindlessSupport.TryCreate(_gl, out var bindless) - && bindless is not null) + if (AcDream.App.Rendering.Wb.WbFoundationFlag.IsEnabled) { - if (bindless.HasShaderDrawParameters(_gl)) + if (AcDream.App.Rendering.Wb.BindlessSupport.TryCreate(_gl, out var bindless)) { - _bindlessSupport = bindless; - Console.WriteLine("[N.5] modern path capabilities present (bindless + ARB_shader_draw_parameters)"); + if (bindless!.HasShaderDrawParameters(_gl)) + { + _bindlessSupport = bindless; + Console.WriteLine("[N.5] modern path capabilities present (bindless + ARB_shader_draw_parameters)"); + } + else + { + Console.WriteLine("[N.5] GL_ARB_shader_draw_parameters not present — modern dispatch path will not activate"); + } } else { - Console.WriteLine("[N.5] GL_ARB_shader_draw_parameters not present — modern dispatch path will not activate"); + Console.WriteLine("[N.5] GL_ARB_bindless_texture not present — modern dispatch path will not activate"); } } diff --git a/src/AcDream.App/Rendering/Wb/BindlessSupport.cs b/src/AcDream.App/Rendering/Wb/BindlessSupport.cs index 1fd6701..eeb4f9d 100644 --- a/src/AcDream.App/Rendering/Wb/BindlessSupport.cs +++ b/src/AcDream.App/Rendering/Wb/BindlessSupport.cs @@ -50,13 +50,6 @@ public sealed class BindlessSupport /// from this extension. public bool HasShaderDrawParameters(GL gl) { - int n = 0; - gl.GetInteger(GLEnum.NumExtensions, out n); - for (int i = 0; i < n; i++) - { - string ext = gl.GetStringS(StringName.Extensions, (uint)i); - if (ext == "GL_ARB_shader_draw_parameters") return true; - } - return false; + return gl.IsExtensionPresent("GL_ARB_shader_draw_parameters"); } }