OpenGLDevice: Fix creation on MacOS

Only for debugging, CI builds have GL disabled.
This commit is contained in:
Stenzek
2025-11-29 01:20:26 +10:00
parent 8bc3f04be5
commit 03c2ec2cad
2 changed files with 3 additions and 2 deletions

View File

@@ -284,7 +284,7 @@ bool OpenGLDevice::CreateDeviceAndMainSwapChain(std::string_view adapter, Create
}
// Context version restrictions are mostly fine here, but we still need to check for UBO for GL3.0.
if (!m_gl_context->IsGLES() && !GLAD_GL_ARB_uniform_buffer_object)
if (!m_gl_context->IsGLES() && !GLAD_GL_VERSION_3_1 && !GLAD_GL_ARB_uniform_buffer_object)
{
Error::SetStringView(error, "OpenGL 3.1 or GL_ARB_uniform_buffer_object is required.");
m_gl_context.reset();

View File

@@ -130,7 +130,8 @@ OpenGLTexture::~OpenGLTexture()
bool OpenGLTexture::UseTextureStorage(bool multisampled)
{
return GLAD_GL_ARB_texture_storage || (multisampled ? GLAD_GL_ES_VERSION_3_1 : GLAD_GL_ES_VERSION_3_0);
return (GLAD_GL_VERSION_4_2 || GLAD_GL_ARB_texture_storage) ||
(multisampled ? GLAD_GL_ES_VERSION_3_1 : GLAD_GL_ES_VERSION_3_0);
}
bool OpenGLTexture::UseTextureStorage() const