diff --git a/Libraries/LibWeb/WebGL/OpenGLContext.cpp b/Libraries/LibWeb/WebGL/OpenGLContext.cpp index b50962221ac..133c2e1ec83 100644 --- a/Libraries/LibWeb/WebGL/OpenGLContext.cpp +++ b/Libraries/LibWeb/WebGL/OpenGLContext.cpp @@ -13,9 +13,12 @@ # include # include # include +# define GL_GLEXT_PROTOTYPES 1 # include # include +extern "C" { # include +} #endif namespace Web::WebGL { @@ -92,8 +95,12 @@ OwnPtr OpenGLContext::create(NonnullRefPtrdisplay, m_impl->surface, m_impl->surface, m_impl->context); + // This extension is not enabled by default in WebGL compatibility mode, so we need to request it. + glRequestExtensionANGLE("GL_ANGLE_texture_rectangle"); + EGLint texture_target_angle = 0; eglGetConfigAttrib(display, config, EGL_BIND_TO_TEXTURE_TARGET_ANGLE, &texture_target_angle); VERIFY(texture_target_angle == EGL_TEXTURE_RECTANGLE_ANGLE); @@ -285,7 +295,7 @@ Vector OpenGLContext::get_supported_extensions() #ifdef AK_OS_MACOS make_current(); - auto const* extensions_string = reinterpret_cast(glGetString(GL_EXTENSIONS)); + auto const* extensions_string = reinterpret_cast(glGetString(GL_REQUESTABLE_EXTENSIONS_ANGLE)); StringView extensions_view(extensions_string, strlen(extensions_string)); Vector extensions;