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:
Aliaksandr Kalenik 2024-12-20 11:26:22 +01:00 committed by Alexander Kalenik
commit c9105955f6
Notes: github-actions[bot] 2024-12-20 14:32:52 +00:00
7 changed files with 108 additions and 1 deletions

View file

@ -0,0 +1,15 @@
#import <WebGL/Types.idl>
// https://registry.khronos.org/webgl/extensions/ANGLE_instanced_arrays/
// NOTE: Original ANGLE_instanced_arrays name is changed to title case,
// so it matches corresponding C++ class name, and does not require
// IDL generator to handle snake_case to TitleCase conversion.
// Having a different name is totally fine, because LegacyNoInterfaceObject
// prevents the name from being exposed to JavaScript.
[Exposed=(Window,Worker), LegacyNoInterfaceObject]
interface ANGLEInstancedArrays {
const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
undefined drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
undefined drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
undefined vertexAttribDivisorANGLE(GLuint index, GLuint divisor);
};