Trait

io.scalajs.dom.html.canvas.webgl

WebGLRenderingContext

Related Doc: package webgl

Permalink

trait WebGLRenderingContext extends Object with RenderingContext

The WebGLRenderingContext interface provides the OpenGL ES 2.0 rendering context for the drawing surface of an HTML <canvas> element.

Annotations
@RawJSType() @native()
See also

https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants

https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext

Linear Supertypes
RenderingContext, Object, Any, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WebGLRenderingContext
  2. RenderingContext
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def ARRAY_BUFFER: GLenum

    Permalink
  5. def COMPILE_STATUS: GLenum

    Permalink
  6. def COPY_READ_BUFFER: GLenum

    Permalink
  7. def COPY_WRITE_BUFFER: GLenum

    Permalink
  8. def DELETE_STATUS: GLenum

    Permalink
  9. def ELEMENT_ARRAY_BUFFER: GLenum

    Permalink
  10. def FRAGMENT_SHADER: GLenum

    Permalink
  11. def HIGH_FLOAT: GLprecision

    Permalink
  12. def HIGH_INT: GLprecision

    Permalink
  13. def LOW_FLOAT: GLprecision

    Permalink
  14. def LOW_INT: GLprecision

    Permalink
  15. def MEDIUM_FLOAT: GLprecision

    Permalink
  16. def MEDIUM_INT: GLprecision

    Permalink
  17. def PIXEL_PACK_BUFFER: GLenum

    Permalink
  18. def PIXEL_UNPACK_BUFFER: GLenum

    Permalink
  19. def SHADER_TYPE: GLenum

    Permalink
  20. def TEXTURE_2D: GLenum

    Permalink
  21. def TEXTURE_2D_ARRAY: GLenum

    Permalink
  22. def TEXTURE_3D: GLenum

    Permalink
  23. def TEXTURE_CUBE_MAP: GLenum

    Permalink
  24. def TRANSFORM_FEEDBACK_BUFFER: GLenum

    Permalink
  25. def TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum

    Permalink
  26. def TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum

    Permalink
  27. def TRANSFORM_FEEDBACK_BUFFER_START: GLenum

    Permalink
  28. def UNIFORM_BUFFER: GLenum

    Permalink
  29. def UNIFORM_BUFFER_BINDING: GLenum

    Permalink
  30. def UNIFORM_BUFFER_SIZE: GLenum

    Permalink
  31. def UNIFORM_BUFFER_START: GLenum

    Permalink
  32. def VERTEX_SHADER: GLenum

    Permalink
  33. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  34. def bindBuffer(target: GLenum, buffer: WebGLBuffer): Unit

    Permalink

    Binds a given WebGLBuffer to a target.

    Binds a given WebGLBuffer to a target.

    target

    A GLenum specifying the binding point (target). Possible values:

    buffer

    A WebGLBuffer to bind.

  35. def bindTexture(target: GLenum, texture: WebGLTexture): Unit

    Permalink

    Binds a given WebGLTexture to a target (binding point).

    Binds a given WebGLTexture to a target (binding point).

    target

    A GLenum specifying the binding point (target). Possible values:

    texture

    A WebGLTexture object to bind.

  36. def canvas: HTMLCanvasElement

    Permalink

    A read-only back-reference to the HTMLCanvasElement.

    A read-only back-reference to the HTMLCanvasElement. Might be null if it is not associated with a <canvas> element.

  37. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. def compileShader(shader: WebGLShader): Unit

    Permalink

    Compiles a GLSL shader into binary data so that it can be used by a WebGLProgram.

    Compiles a GLSL shader into binary data so that it can be used by a WebGLProgram.

    shader

    A fragment or vertex WebGLShader.

  39. def createBuffer(): WebGLBuffer

    Permalink

    Returns a WebGLBuffer storing data such as vertices or colors.

    Returns a WebGLBuffer storing data such as vertices or colors.

    returns

    a WebGLBuffer storing data such as vertices or colors.

  40. def createProgram(): WebGLProgram

    Permalink

    Returns a WebGLProgram object that is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL).

    Returns a WebGLProgram object that is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). These are then linked into a usable program.

    returns

    A WebGLProgram object that is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL).

  41. def createShader(type: GLenum): WebGLShader

    Permalink

    Creates a WebGLShader that can then be configured further using WebGLRenderingContext.shaderSource() and WebGLRenderingContext.compileShader().

    Creates a WebGLShader that can then be configured further using WebGLRenderingContext.shaderSource() and WebGLRenderingContext.compileShader().

    returns

    a new WebGLShader

  42. def createTexture(): WebGLTexture

    Permalink

    Creates and initializes a WebGLTexture object.

    Creates and initializes a WebGLTexture object.

    returns

    a WebGLTexture object.

  43. def deleteBuffer(buffer: WebGLBuffer): Unit

    Permalink

    Deletes a given WebGLBuffer.

    Deletes a given WebGLBuffer. This method has no effect if the buffer has already been deleted.

    buffer

    the given WebGLBuffer

  44. def deleteTexture(texture: WebGLTexture): Unit

    Permalink

    Deletes a given WebGLTexture object.

    Deletes a given WebGLTexture object. This method has no effect if the texture has already been deleted.

    texture

    A WebGLTexture object to delete.

  45. def drawingBufferHeight: Int

    Permalink

    The read-only height of the current drawing buffer.

    The read-only height of the current drawing buffer. Should match the height of the canvas element associated with this context.

  46. def drawingBufferWidth: Int

    Permalink

    The read-only width of the current drawing buffer.

    The read-only width of the current drawing buffer. Should match the width of the canvas element associated with this context.

  47. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  48. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  49. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  50. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  51. def getProgramParameter(program: WebGLProgram, pname: GLenum): Any

    Permalink

    Returns information about the given program.

    Returns information about the given program.

    program

    A WebGLProgram to get parameter information from.

    pname

    A GLenum specifying the information to query. Possible values:

    returns

    the requested program information (as specified with pname).

    Example:
    1. gl.getProgramParameter(program, gl.DELETE_STATUS)
  52. def getShaderParameter(shader: WebGLShader, pname: GLenum): Any

    Permalink

    Returns information about the given shader.

    Returns information about the given shader.

    shader

    A WebGLShader to get parameter information from.

    pname

    A GLenum specifying the information to query. Possible values:

    • gl.DELETE_STATUS: Returns a GLboolean indicating whether or not the shader is flagged for deletion.
    • gl.COMPILE_STATUS: Returns a GLboolean indicating whether or not the las shader compilation was successful.
    • gl.SHADER_TYPE: Returns a GLenum indicating the whether the shader is a vertex shader (gl.VERTEX_SHADER) or fragment shader (gl.FRAGMENT_SHADER) object.
    returns

    the requested shader information (as specified with pname).

  53. def getShaderPrecisionFormat(shaderType: GLenum, precisionType: GLprecision): WebGLShaderPrecisionFormat

    Permalink

    Returns a new WebGLShaderPrecisionFormat object describing the range and precision for the specified shader numeric format.

    Returns a new WebGLShaderPrecisionFormat object describing the range and precision for the specified shader numeric format.

    shaderType

    Either a FRAGMENT_SHADER or a VERTEX_SHADER.

    precisionType

    A precision type value. Either LOW_FLOAT, MEDIUM_FLOAT, HIGH_FLOAT, LOW_INT, MEDIUM_INT, or HIGH_INT.

    returns

    A WebGLShaderPrecisionFormat object or null, if an error occurs.

    Example:
    1. gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT)
  54. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  55. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  56. def isBuffer(buffer: Any): Boolean

    Permalink

    Returns true if the passed WebGLBuffer is valid and false otherwise.

    Returns true if the passed WebGLBuffer is valid and false otherwise.

    buffer

    the given object to test

    returns

    true if the passed WebGLBuffer is valid and false otherwise.

  57. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  58. def isProgram(program: Any): Boolean

    Permalink

    Returns true if the passed WebGLProgram is valid, false otherwise.

    Returns true if the passed WebGLProgram is valid, false otherwise.

    program

    A WebGLProgram to check.

    returns

    true if the passed WebGLProgram is valid, false otherwise.

  59. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  60. def isTexture(texture: Any): Boolean

    Permalink

    Returns true if the passed WebGLTexture is valid and false otherwise.

    Returns true if the passed WebGLTexture is valid and false otherwise.

    texture

    the passed WebGLTexture

    returns

    true if the passed WebGLTexture is valid and false otherwise.

  61. def linkProgram(program: WebGLProgram): Unit

    Permalink

    Links a given WebGLProgram to the attached vertex and fragment shaders.

    Links a given WebGLProgram to the attached vertex and fragment shaders.

    program

    A WebGLProgram to link.

  62. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  63. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  64. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  65. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  66. def shaderSource(shader: WebGLShader, source: DOMString): Unit

    Permalink

    Sets the source code of a WebGLShader.

    Sets the source code of a WebGLShader.

    shader

    A WebGLShader object in which to set the source code.

    source

    A DOMString containing the GLSL source code to set.

  67. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  68. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  69. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  70. def useProgram(program: WebGLProgram): Unit

    Permalink

    Sets the specified WebGLProgram as part the current rendering state.

    Sets the specified WebGLProgram as part the current rendering state.

    program

    A WebGLProgram to use.

  71. def validateProgram(program: WebGLProgram): Unit

    Permalink

    Validates a WebGLProgram.

    Validates a WebGLProgram. It checks if it is successfully linked and if it can be used in the current WebGL state.

    program

    A WebGLProgram to validate.

  72. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  73. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  74. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  75. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RenderingContext

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped