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