mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/WebGL: Implement the WEBGL_compressed_texture_s3tc_srgb extension
This commit is contained in:
parent
ddf60ebe9e
commit
d08915a0cd
Notes:
github-actions[bot]
2025-10-20 13:34:45 +00:00
Author: https://github.com/Lubrsi
Commit: d08915a0cd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6521
Reviewed-by: https://github.com/gmta ✅
10 changed files with 117 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include <LibWeb/WebGL/Extensions/EXTBlendMinMax.h>
|
||||
#include <LibWeb/WebGL/Extensions/OESVertexArrayObject.h>
|
||||
#include <LibWeb/WebGL/Extensions/WebGLCompressedTextureS3tc.h>
|
||||
#include <LibWeb/WebGL/Extensions/WebGLCompressedTextureS3tcSrgb.h>
|
||||
#include <LibWeb/WebGL/Extensions/WebGLDrawBuffers.h>
|
||||
#include <LibWeb/WebGL/OpenGLContext.h>
|
||||
#include <LibWeb/WebGL/WebGLContextEvent.h>
|
||||
|
|
@ -97,6 +98,7 @@ void WebGLRenderingContext::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_ext_blend_min_max_extension);
|
||||
visitor.visit(m_oes_vertex_array_object_extension);
|
||||
visitor.visit(m_webgl_compressed_texture_s3tc_extension);
|
||||
visitor.visit(m_webgl_compressed_texture_s3tc_srgb_extension);
|
||||
visitor.visit(m_webgl_draw_buffers_extension);
|
||||
}
|
||||
|
||||
|
|
@ -222,6 +224,15 @@ JS::Object* WebGLRenderingContext::get_extension(String const& name)
|
|||
return m_webgl_compressed_texture_s3tc_extension;
|
||||
}
|
||||
|
||||
if (name.equals_ignoring_ascii_case("WEBGL_compressed_texture_s3tc_srgb"sv)) {
|
||||
if (!m_webgl_compressed_texture_s3tc_srgb_extension) {
|
||||
m_webgl_compressed_texture_s3tc_srgb_extension = MUST(Extensions::WebGLCompressedTextureS3tcSrgb::create(realm(), this));
|
||||
}
|
||||
|
||||
VERIFY(m_webgl_compressed_texture_s3tc_srgb_extension);
|
||||
return m_webgl_compressed_texture_s3tc_srgb_extension;
|
||||
}
|
||||
|
||||
if (name.equals_ignoring_ascii_case("WEBGL_draw_buffers"sv)) {
|
||||
if (!m_webgl_draw_buffers_extension) {
|
||||
m_webgl_draw_buffers_extension = MUST(Extensions::WebGLDrawBuffers::create(realm(), *this));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue