WebIDLpedia

WebGL2RenderingContextOverloads interface mixin

Definition

WebGL 2.0 Specification defines WebGL2RenderingContextOverloads



interface mixin WebGL2RenderingContextOverloads
{
  // WebGL1:
  undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage);
  undefined bufferData(GLenum target, AllowSharedBufferSource? srcData, GLenum usage);
  undefined bufferSubData(GLenum target, GLintptr dstByteOffset, AllowSharedBufferSource srcData);
  // WebGL2:
  undefined bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage, unsigned long long srcOffset,
                       optional GLuint length = 0);
  undefined bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] ArrayBufferView srcData,
                          unsigned long long srcOffset, optional GLuint length = 0);

  // WebGL1 legacy entrypoints:
  undefined texImage2D(GLenum target, GLint level, GLint internalformat,
                       GLsizei width, GLsizei height, GLint border, GLenum format,
                       GLenum type, [AllowShared] ArrayBufferView? pixels);
  undefined texImage2D(GLenum target, GLint level, GLint internalformat,
                       GLenum format, GLenum type, TexImageSource source); // May throw DOMException

  undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                          GLsizei width, GLsizei height,
                          GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
  undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                          GLenum format, GLenum type, TexImageSource source); // May throw DOMException

  // WebGL2 entrypoints:
  undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
                       GLint border, GLenum format, GLenum type, GLintptr pboOffset);
  undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
                       GLint border, GLenum format, GLenum type,
                       TexImageSource source); // May throw DOMException
  undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
                       GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData,
                       unsigned long long srcOffset);

  undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
                          GLsizei height, GLenum format, GLenum type, GLintptr pboOffset);
  undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
                          GLsizei height, GLenum format, GLenum type,
                          TexImageSource source); // May throw DOMException
  undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
                          GLsizei height, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData,
                          unsigned long long srcOffset);

  undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
                                 GLsizei height, GLint border, GLsizei imageSize, GLintptr offset);
  undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
                                 GLsizei height, GLint border, [AllowShared] ArrayBufferView srcData,
                                 optional unsigned long long srcOffset = 0, optional GLuint srcLengthOverride = 0);

  undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                                    GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLintptr offset);
  undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                                    GLsizei width, GLsizei height, GLenum format,
                                    [AllowShared] ArrayBufferView srcData,
                                    optional unsigned long long srcOffset = 0,
                                    optional GLuint srcLengthOverride = 0);

  undefined uniform1fv(WebGLUniformLocation? location, Float32List data, optional unsigned long long srcOffset = 0,
                       optional GLuint srcLength = 0);
  undefined uniform2fv(WebGLUniformLocation? location, Float32List data, optional unsigned long long srcOffset = 0,
                       optional GLuint srcLength = 0);
  undefined uniform3fv(WebGLUniformLocation? location, Float32List data, optional unsigned long long srcOffset = 0,
                       optional GLuint srcLength = 0);
  undefined uniform4fv(WebGLUniformLocation? location, Float32List data, optional unsigned long long srcOffset = 0,
                       optional GLuint srcLength = 0);

  undefined uniform1iv(WebGLUniformLocation? location, Int32List data, optional unsigned long long srcOffset = 0,
                       optional GLuint srcLength = 0);
  undefined uniform2iv(WebGLUniformLocation? location, Int32List data, optional unsigned long long srcOffset = 0,
                       optional GLuint srcLength = 0);
  undefined uniform3iv(WebGLUniformLocation? location, Int32List data, optional unsigned long long srcOffset = 0,
                       optional GLuint srcLength = 0);
  undefined uniform4iv(WebGLUniformLocation? location, Int32List data, optional unsigned long long srcOffset = 0,
                       optional GLuint srcLength = 0);

  undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
                             optional unsigned long long srcOffset = 0, optional GLuint srcLength = 0);
  undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
                             optional unsigned long long srcOffset = 0, optional GLuint srcLength = 0);
  undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
                             optional unsigned long long srcOffset = 0, optional GLuint srcLength = 0);

  /* Reading back pixels */
  // WebGL1:
  undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
                       [AllowShared] ArrayBufferView? dstData);
  // WebGL2:
  undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
                       GLintptr offset);
  undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
                       [AllowShared] ArrayBufferView dstData, unsigned long long dstOffset);
};

Referring IDL interfaces/dictionaries