2024-12-01 00:09:41 +01:00
|
|
|
#import <WebGL/Types.idl>
|
|
|
|
|
|
|
|
|
|
// FIXME: BufferSource should be a Float32Array
|
|
|
|
|
typedef (BufferSource or sequence<GLfloat>) Float32List;
|
|
|
|
|
|
2024-08-17 01:26:02 +01:00
|
|
|
// https://registry.khronos.org/webgl/specs/latest/1.0/#5.14
|
|
|
|
|
interface mixin WebGLRenderingContextOverloads {
|
2024-12-01 00:09:41 +01:00
|
|
|
undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage);
|
|
|
|
|
// FIXME: BufferSource is really a AllowSharedBufferSource
|
|
|
|
|
undefined bufferData(GLenum target, BufferSource? data, GLenum usage);
|
2024-08-17 01:26:02 +01:00
|
|
|
[FIXME] undefined bufferSubData(GLenum target, GLintptr offset, AllowSharedBufferSource data);
|
|
|
|
|
|
|
|
|
|
[FIXME] undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, [AllowShared] ArrayBufferView data);
|
|
|
|
|
[FIXME] undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, [AllowShared] ArrayBufferView data);
|
|
|
|
|
|
|
|
|
|
[FIXME] undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
|
|
|
|
|
|
2024-12-02 20:40:16 +01:00
|
|
|
undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
|
2024-08-17 01:26:02 +01:00
|
|
|
[FIXME] undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, TexImageSource source); // May throw DOMException
|
|
|
|
|
|
|
|
|
|
[FIXME] undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
|
|
|
|
|
[FIXME] undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type, TexImageSource source); // May throw DOMException
|
|
|
|
|
|
2024-12-01 00:09:41 +01:00
|
|
|
undefined uniform1fv(WebGLUniformLocation? location, Float32List v);
|
|
|
|
|
undefined uniform2fv(WebGLUniformLocation? location, Float32List v);
|
|
|
|
|
undefined uniform3fv(WebGLUniformLocation? location, Float32List v);
|
|
|
|
|
undefined uniform4fv(WebGLUniformLocation? location, Float32List v);
|
2024-08-17 01:26:02 +01:00
|
|
|
|
|
|
|
|
[FIXME] undefined uniform1iv(WebGLUniformLocation? location, Int32List v);
|
|
|
|
|
[FIXME] undefined uniform2iv(WebGLUniformLocation? location, Int32List v);
|
|
|
|
|
[FIXME] undefined uniform3iv(WebGLUniformLocation? location, Int32List v);
|
|
|
|
|
[FIXME] undefined uniform4iv(WebGLUniformLocation? location, Int32List v);
|
|
|
|
|
|
2024-12-01 00:09:41 +01:00
|
|
|
// FIXME: Float32Array should be a Float32List
|
|
|
|
|
undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value);
|
|
|
|
|
undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value);
|
|
|
|
|
undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value);
|
2024-08-17 01:26:02 +01:00
|
|
|
};
|