diff options
author | Luke Wilde <lukew@serenityos.org> | 2022-06-04 04:33:00 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-06-13 21:45:27 +0100 |
commit | aa77c26b60b54cbc5099dc94491288c9c6804d63 (patch) | |
tree | cc0588b0ab03eec66d1cc367463501669d21ec8a /Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp | |
parent | 076c9772a4ce2a1fe2a6ce39a0d787f3d4bea488 (diff) | |
download | serenity-aa77c26b60b54cbc5099dc94491288c9c6804d63.zip |
LibWeb/WebGL: Add extensions APIs to WebGLRenderingContextBase
These currently return nothing, as we don't currently support any WebGL
extensions.
Diffstat (limited to 'Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp b/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp index e03faa92ef..28c2d0d1d0 100644 --- a/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp +++ b/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp @@ -71,6 +71,28 @@ void WebGLRenderingContextBase::needs_to_present() m_canvas_element->layout_node()->set_needs_display(); } +Optional<Vector<String>> WebGLRenderingContextBase::get_supported_extensions() const +{ + if (m_context_lost) + return Optional<Vector<String>> {}; + + dbgln_if(WEBGL_CONTEXT_DEBUG, "WebGLRenderingContextBase::get_supported_extensions()"); + + // FIXME: We don't currently support any extensions. + return Vector<String> {}; +} + +JS::Object* WebGLRenderingContextBase::get_extension(String const& name) const +{ + if (m_context_lost) + return nullptr; + + dbgln_if(WEBGL_CONTEXT_DEBUG, "WebGLRenderingContextBase::get_extension(name='{}')", name); + + // FIXME: We don't currently support any extensions. + return nullptr; +} + void WebGLRenderingContextBase::clear(GLbitfield mask) { if (m_context_lost) |