mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
LibWeb/WebGL: Add support for ANGLEInstancedArrays extension
This is only WebGL 1.0 extension. It's enabled in ANGLE by default. Progress on https://ciechanow.ski/curves-and-surfaces/ that relies on this extension.
This commit is contained in:
committed by
Alexander Kalenik
parent
99b49a5978
commit
c9105955f6
@@ -12,6 +12,7 @@
|
||||
#include <LibWeb/HTML/HTMLCanvasElement.h>
|
||||
#include <LibWeb/HTML/TraversableNavigable.h>
|
||||
#include <LibWeb/Painting/Paintable.h>
|
||||
#include <LibWeb/WebGL/ANGLEInstancedArrays.h>
|
||||
#include <LibWeb/WebGL/EventNames.h>
|
||||
#include <LibWeb/WebGL/OpenGLContext.h>
|
||||
#include <LibWeb/WebGL/WebGLContextEvent.h>
|
||||
@@ -166,8 +167,11 @@ Optional<Vector<String>> WebGLRenderingContext::get_supported_extensions()
|
||||
return context().get_supported_extensions();
|
||||
}
|
||||
|
||||
JS::Object* WebGLRenderingContext::get_extension(String const&)
|
||||
JS::Object* WebGLRenderingContext::get_extension(String const& name)
|
||||
{
|
||||
if (name == "ANGLE_instanced_arrays"sv) {
|
||||
return MUST(ANGLEInstancedArrays::create(realm()));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user