mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/WebGL2: Implement the EXT_render_snorm extension
This commit is contained in:
parent
7ba496b798
commit
93d3ebfd59
Notes:
github-actions[bot]
2025-10-20 13:34:59 +00:00
Author: https://github.com/Lubrsi
Commit: 93d3ebfd59
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6521
Reviewed-by: https://github.com/gmta ✅
8 changed files with 99 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include <LibWeb/Painting/Paintable.h>
|
||||
#include <LibWeb/WebGL/EventNames.h>
|
||||
#include <LibWeb/WebGL/Extensions/EXTColorBufferFloat.h>
|
||||
#include <LibWeb/WebGL/Extensions/EXTRenderSnorm.h>
|
||||
#include <LibWeb/WebGL/Extensions/WebGLCompressedTextureS3tc.h>
|
||||
#include <LibWeb/WebGL/OpenGLContext.h>
|
||||
#include <LibWeb/WebGL/WebGL2RenderingContext.h>
|
||||
|
|
@ -75,6 +76,7 @@ void WebGL2RenderingContext::visit_edges(Cell::Visitor& visitor)
|
|||
WebGL2RenderingContextImpl::visit_edges(visitor);
|
||||
visitor.visit(m_canvas_element);
|
||||
visitor.visit(m_ext_color_buffer_float_extension);
|
||||
visitor.visit(m_ext_render_snorm);
|
||||
visitor.visit(m_webgl_compressed_texture_s3tc_extension);
|
||||
}
|
||||
|
||||
|
|
@ -182,6 +184,15 @@ JS::Object* WebGL2RenderingContext::get_extension(String const& name)
|
|||
return m_ext_color_buffer_float_extension;
|
||||
}
|
||||
|
||||
if (name.equals_ignoring_ascii_case("EXT_render_snorm"sv)) {
|
||||
if (!m_ext_render_snorm) {
|
||||
m_ext_render_snorm = MUST(Extensions::EXTRenderSnorm::create(realm(), *this));
|
||||
}
|
||||
|
||||
VERIFY(m_ext_render_snorm);
|
||||
return m_ext_render_snorm;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue