|
17 | 17 | #include <LibWeb/WebGL/Extensions/ANGLEInstancedArrays.h> |
18 | 18 | #include <LibWeb/WebGL/Extensions/EXTBlendMinMax.h> |
19 | 19 | #include <LibWeb/WebGL/Extensions/EXTTextureFilterAnisotropic.h> |
| 20 | +#include <LibWeb/WebGL/Extensions/OESStandardDerivatives.h> |
20 | 21 | #include <LibWeb/WebGL/Extensions/OESVertexArrayObject.h> |
21 | 22 | #include <LibWeb/WebGL/Extensions/WebGLCompressedTextureS3tc.h> |
22 | 23 | #include <LibWeb/WebGL/Extensions/WebGLCompressedTextureS3tcSrgb.h> |
@@ -98,6 +99,7 @@ void WebGLRenderingContext::visit_edges(Cell::Visitor& visitor) |
98 | 99 | visitor.visit(m_angle_instanced_arrays_extension); |
99 | 100 | visitor.visit(m_ext_blend_min_max_extension); |
100 | 101 | visitor.visit(m_ext_texture_filter_anisotropic); |
| 102 | + visitor.visit(m_oes_standard_derivatives_object_extension); |
101 | 103 | visitor.visit(m_oes_vertex_array_object_extension); |
102 | 104 | visitor.visit(m_webgl_compressed_texture_s3tc_extension); |
103 | 105 | visitor.visit(m_webgl_compressed_texture_s3tc_srgb_extension); |
@@ -208,6 +210,15 @@ JS::Object* WebGLRenderingContext::get_extension(String const& name) |
208 | 210 | return m_ext_texture_filter_anisotropic; |
209 | 211 | } |
210 | 212 |
|
| 213 | + if (name.equals_ignoring_ascii_case("OES_standard_derivatives"sv)) { |
| 214 | + if (!m_oes_standard_derivatives_object_extension) { |
| 215 | + m_oes_standard_derivatives_object_extension = MUST(Extensions::OESStandardDerivatives::create(realm(), *this)); |
| 216 | + } |
| 217 | + |
| 218 | + VERIFY(m_oes_standard_derivatives_object_extension); |
| 219 | + return m_oes_standard_derivatives_object_extension; |
| 220 | + } |
| 221 | + |
211 | 222 | if (name.equals_ignoring_ascii_case("OES_vertex_array_object"sv)) { |
212 | 223 | if (!m_oes_vertex_array_object_extension) { |
213 | 224 | m_oes_vertex_array_object_extension = MUST(Extensions::OESVertexArrayObject::create(realm(), *this)); |
@@ -279,6 +290,11 @@ bool WebGLRenderingContext::angle_instanced_arrays_extension_enabled() const |
279 | 290 | return !!m_angle_instanced_arrays_extension; |
280 | 291 | } |
281 | 292 |
|
| 293 | +bool WebGLRenderingContext::oes_standard_derivatives_extension_enabled() const |
| 294 | +{ |
| 295 | + return !!m_oes_standard_derivatives_object_extension; |
| 296 | +} |
| 297 | + |
282 | 298 | ReadonlySpan<WebIDL::UnsignedLong> WebGLRenderingContext::enabled_compressed_texture_formats() const |
283 | 299 | { |
284 | 300 | return m_enabled_compressed_texture_formats; |
|
0 commit comments