mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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:
parent
99b49a5978
commit
c9105955f6
Notes:
github-actions[bot]
2024-12-20 14:32:52 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: c9105955f6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2990
7 changed files with 108 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue