Skip to content

Commit 03c2ec2

Browse files
committed
OpenGLDevice: Fix creation on MacOS
Only for debugging, CI builds have GL disabled.
1 parent 8bc3f04 commit 03c2ec2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/util/opengl_device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ bool OpenGLDevice::CreateDeviceAndMainSwapChain(std::string_view adapter, Create
284284
}
285285

286286
// Context version restrictions are mostly fine here, but we still need to check for UBO for GL3.0.
287-
if (!m_gl_context->IsGLES() && !GLAD_GL_ARB_uniform_buffer_object)
287+
if (!m_gl_context->IsGLES() && !GLAD_GL_VERSION_3_1 && !GLAD_GL_ARB_uniform_buffer_object)
288288
{
289289
Error::SetStringView(error, "OpenGL 3.1 or GL_ARB_uniform_buffer_object is required.");
290290
m_gl_context.reset();

src/util/opengl_texture.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ OpenGLTexture::~OpenGLTexture()
130130

131131
bool OpenGLTexture::UseTextureStorage(bool multisampled)
132132
{
133-
return GLAD_GL_ARB_texture_storage || (multisampled ? GLAD_GL_ES_VERSION_3_1 : GLAD_GL_ES_VERSION_3_0);
133+
return (GLAD_GL_VERSION_4_2 || GLAD_GL_ARB_texture_storage) ||
134+
(multisampled ? GLAD_GL_ES_VERSION_3_1 : GLAD_GL_ES_VERSION_3_0);
134135
}
135136

136137
bool OpenGLTexture::UseTextureStorage() const

0 commit comments

Comments
 (0)