org.scalajs.dom.raw

WebGLRenderingContext

Related Docs: object WebGLRenderingContext | package raw

class WebGLRenderingContext extends Object

Annotations
@RawJSType()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. WebGLRenderingContext
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WebGLRenderingContext()

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. def activeTexture(texture: Int): Unit

    Selects the active texture unit.

    Selects the active texture unit.

    texture

    an integer specifying the texture unit to make active. Must be in 0 .. MAX_COMBINED_TEXTURE_UNITS-1

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def attachShader(program: WebGLProgram, shader: WebGLShader): Unit

    Attaches a shader (fragment or vertex) to a WebGLProgram.

  7. def bindAttribLocation(program: WebGLProgram, index: Int, name: String): Unit

    Associates a vertex attribute index with a named attribute variable.

  8. def bindBuffer(target: Int, buffer: WebGLBuffer): Unit

    Loads a a target into a WebGLBuffer.

    Loads a a target into a WebGLBuffer.

    target

    the target to bind the buffer to. May be WebGLRenderingContext.ARRAY_BUFFER or WebGLRenderingContext.ELEMENT_ARRAY_BUFFER

  9. def bindFramebuffer(target: Int, framebuffer: WebGLFramebuffer): Unit

    Loads a a target into a WebGLFramebuffer.

    Loads a a target into a WebGLFramebuffer.

    target

    the target to bind the framebuffer to. Must be WebGLRenderingContext.FRAMEBUFFER.

    framebuffer

    a framebuffer object, or null to bind the default framebuffer.

  10. def bindRenderbuffer(target: Int, renderbuffer: WebGLRenderbuffer): Unit

    Loads a a target into a WebGLRenderbuffer.

    Loads a a target into a WebGLRenderbuffer.

    target

    target to bind to, must be WebGLRenderingContext.RENDERBUFFER

    renderbuffer

    the renderbuffer to bind. If null, any object bound to target us unbound.

  11. def bindTexture(target: Int, texture: WebGLTexture): Unit

    Loads a the active texture unit into a WebGLTexture.

    Loads a the active texture unit into a WebGLTexture.

    target

    the target to bind to. Must be WebGLRenderingContext.TEXTURE_2D or WebGLRenderingContext.TEXTURE_CUBE_MAP

    texture

    the texture to bind.

  12. def blendColor(red: Double, green: Double, blue: Double, alpha: Double): Unit

    Sets the blend color used in WebGLRenderingContext.BLEND_COLOR.

  13. def blendEquation(mode: Int): Unit

    Specifies the equation used for RGB and Alpha blending.

    Specifies the equation used for RGB and Alpha blending.

    mode

    blend equation to use. Can be one of WebGLRenderingContext.FUNC_ADD, WebGLRenderingContext.FUNC_SUBTRACT, or WebGLRenderingContext.FUNC_REVERSE_SUBTRACT

  14. def blendEquationSeparate(modeRGB: Int, modeAlpha: Int): Unit

    Specifies the equation used for RGB and Alpha blending separately.

    Specifies the equation used for RGB and Alpha blending separately.

    modeRGB

    blend equation to use for RGB components. Can be one of WebGLRenderingContext.FUNC_ADD, WebGLRenderingContext.FUNC_SUBTRACT, or WebGLRenderingContext.FUNC_REVERSE_SUBTRACT

    modeAlpha

    blend equation to use for alpha components. Can be one of WebGLRenderingContext.FUNC_ADD, WebGLRenderingContext.FUNC_SUBTRACT, or WebGLRenderingContext.FUNC_REVERSE_SUBTRACT

  15. def blendFunc(sfactor: Int, dfactor: Int): Unit

    Specifies how the blending factors are computed for source and destination pixels.

  16. def blendFuncSeparate(srcRGB: Int, dstRGB: Int, srcAlpha: Int, dstAlpha: Int): Unit

    Specifies how the blending factors are computed for source and destination pixels, separately for alpha and RGB.

    Specifies how the blending factors are computed for source and destination pixels, separately for alpha and RGB.

    srcRGB

    The source blending factor for RGB. May be one of WebGLRenderingContext.ZERO, WebGLRenderingContext.ONE, WebGLRenderingContext.SRC_COLOR, WebGLRenderingContext.ONE_MINUS_SRC_COLOR, WebGLRenderingContext.DST_COLOR, WebGLRenderingContext.ONE_MINUS_DST_COLOR, WebGLRenderingContext.SRC_ALPHA, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA, WebGLRenderingContext.DST_ALPHA, WebGLRenderingContext.ONE_MINUS_DST_ALPHA, WebGLRenderingContext.CONSTANT_COLOR, WebGLRenderingContext.ONE_MINUS_CONSTANT_COLOR, WebGLRenderingContext.CONSTANT_ALPHA, WebGLRenderingContext.ONE_MINUS_CONSTANT_ALPHA, or WebGLRenderingContext.SRC_ALPHA_SATURATE. Initially this value is WebGLRenderingContext.ONE.

    dstRGB

    The destination blending factor for RGB. May be one of WebGLRenderingContext.ZERO, WebGLRenderingContext.ONE, WebGLRenderingContext.SRC_COLOR, WebGLRenderingContext.ONE_MINUS_SRC_COLOR, WebGLRenderingContext.DST_COLOR, WebGLRenderingContext.ONE_MINUS_DST_COLOR, WebGLRenderingContext.SRC_ALPHA, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA, WebGLRenderingContext.DST_ALPHA, WebGLRenderingContext.ONE_MINUS_DST_ALPHA, WebGLRenderingContext.CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, WebGLRenderingContext.CONSTANT_ALPHA, or WebGLRenderingContext.ONE_MINUS_CONSTANT_ALPHA. This value is initially WebGLRenderingContext.ZERO.

    srcAlpha

    The source blending factor for Alpha. Accepted values are the same as srcRGB. The initial value is WebGLRenderingContext.ONE.

    dstAlpha

    The destination blending factor for Alpha. Accepted values are the same as srcRGB. The initial value is WebGLRenderingContext.ZERO.

  17. def bufferData(target: Int, data: ArrayBuffer, usage: Int): Unit

    Resizes the bound WebGLBuffer for the given target to the size of the passed buffer, and replaces its contents with the contents of the buffer.

    Resizes the bound WebGLBuffer for the given target to the size of the passed buffer, and replaces its contents with the contents of the buffer.

    target

    The target to resize. May be WebGLRenderingContext.ARRAY_BUFFER or WebGLRenderingContext.ELEMENT_ARRAY_BUFFER.

    data

    the source data for the new buffer.

    usage

    The specified usage for this buffer. May be WebGLRenderingContext.STREAM_DRAW, WebGLRenderingContext.STATIC_DRAW or WebGLRenderingContext.DYNAMIC_DRAW.

  18. def bufferData(target: Int, data: ArrayBufferView, usage: Int): Unit

    Resizes the bound WebGLBuffer for the given target to the size of the passed buffer, and replaces its contents with the contents of the buffer.

    Resizes the bound WebGLBuffer for the given target to the size of the passed buffer, and replaces its contents with the contents of the buffer.

    target

    The target to resize. May be WebGLRenderingContext.ARRAY_BUFFER or WebGLRenderingContext.ELEMENT_ARRAY_BUFFER.

    data

    the source data for the new buffer.

    usage

    The specified usage for this buffer. May be WebGLRenderingContext.STREAM_DRAW, WebGLRenderingContext.STATIC_DRAW or WebGLRenderingContext.DYNAMIC_DRAW.

  19. def bufferData(target: Int, size: Int, usage: Int): Unit

    Sets the size of the bound WebGLBuffer for the given target.

    Sets the size of the bound WebGLBuffer for the given target. The contents of the buffer are cleared to 0.

    target

    The target to resize. May be WebGLRenderingContext.ARRAY_BUFFER or WebGLRenderingContext.ELEMENT_ARRAY_BUFFER.

    size

    The size of the new buffer

    usage

    The specified usage for this buffer. May be WebGLRenderingContext.STREAM_DRAW, WebGLRenderingContext.STATIC_DRAW or WebGLRenderingContext.DYNAMIC_DRAW.

  20. def bufferSubData(target: Int, offset: Int, data: ArrayBuffer): Unit

  21. def bufferSubData(target: Int, offset: Int, data: ArrayBufferView): Unit

  22. val canvas: HTMLCanvasElement

    The canvas object this WebGLRenderingContext is associated with.

  23. def checkFramebufferStatus(target: Int): Int

    Returns the completeness status for the framebuffer.

    Returns the completeness status for the framebuffer.

    The possible results are:

    target

    the target framebuffer object, must be WebGLRenderingContext.FRAMEBUFFER.

    returns

    the framebuffer status.

  24. def clear(mask: Int): Unit

    Clears the buffers specified in mask with the current WebGLRenderingContext#clearColor, WebGLRenderingContext#clearDepth and WebGLRenderingContext#clearStencil.

  25. def clearColor(red: Double, green: Double, blue: Double, alpha: Double): Unit

    Sets the clear color to use with WebGLRenderingContext#clear.

  26. def clearDepth(depth: Int): Unit

    Sets the clear depth to use with WebGLRenderingContext#clear.

  27. def clearStencil(s: Int): Unit

    Sets the stencil value to use with WebGLRenderingContext#clear.

  28. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def colorMask(red: Boolean, green: Boolean, blue: Boolean, alpha: Boolean): Unit

    Enable and disable writing to the given channels.

    Enable and disable writing to the given channels. For each channel, true will allow writing, false will prevent it.

  30. def compileShader(shader: WebGLShader): Unit

    Compiles the provided shader.

    Compiles the provided shader.

    The WebGLRenderingContext#getShaderParameter can be used to determine if this operation succeeded.

  31. def compressedTexImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, data: ArrayBufferView): Unit

    Loads a 2-dimensional texture into a texture unit, compressed with the specified algorithm.

    Loads a 2-dimensional texture into a texture unit, compressed with the specified algorithm.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    internalformat

    the format of the compressed data.

    width

    the width of the texture image.

    height

    the height of the texture image.

    border

    the border width. Must be 0.

    data

    the compressed image data.

  32. def compressedTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, data: ArrayBufferView): Unit

    Loads a 2-dimensional texture subimage into a texture unit, compressed with the specified algorithm.

    Loads a 2-dimensional texture subimage into a texture unit, compressed with the specified algorithm.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    xoffset

    the x texel offset into the texture image.

    yoffset

    the y texel offset into the texture image.

    width

    the width of the texture image.

    height

    the height of the texture image.

    data

    the compressed image data.

  33. def copyTexImage2D(target: Int, level: Int, internalformat: Int, x: Int, y: Int, width: Int, height: Int, border: Int): Unit

    Loads a 2-dimensional texture into a texture unit from the current framebuffer.

    Loads a 2-dimensional texture into a texture unit from the current framebuffer.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    internalformat

    the format of the data. May be WebGLRenderingContext.ALPHA, WebGLRenderingContext.LUMINANCE, WebGLRenderingContext.LUMINANCE_ALPHA, WebGLRenderingContext.RGB, or WebGLRenderingContext.RGBA.

    x

    the window coordinates of the lower left corner of the framebuffer.

    y

    the window coordinates of the lower left corner of the framebuffer.

    width

    the width of the texture image.

    height

    the height of the texture image.

    border

    the border width. Must be 0.

  34. def copyTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, x: Int, y: Int, width: Int, height: Int): Unit

    Loads a 2-dimensional texture subimage into a texture unit from the current framebuffer.

    Loads a 2-dimensional texture subimage into a texture unit from the current framebuffer.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    xoffset

    the x texel offset into the texture image.

    yoffset

    the y texel offset into the texture image.

    x

    the window coordinates of the lower left corner of the framebuffer.

    y

    the window coordinates of the lower left corner of the framebuffer.

    width

    the width of the texture image.

    height

    the height of the texture image.

  35. def createBuffer(): WebGLBuffer

    Creates a new WebGLBuffer.

  36. def createFramebuffer(): WebGLFramebuffer

    Creates a new WebGLFramebuffer.

  37. def createProgram(): WebGLProgram

    Creates a new WebGLProgram.

  38. def createRenderbuffer(): WebGLRenderbuffer

    Creates a new WebGLRenderbuffer.

  39. def createShader(type: Int): WebGLShader

    Creates a new WebGLShader.

  40. def createTexture(): WebGLTexture

    Creates a new WebGLTexture.

  41. def cullFace(mode: Int): Unit

    Set the culling mode for front and back facing polygons.

    Set the culling mode for front and back facing polygons.

    mode

    the culling mode, may be WebGLRenderingContext.FRONT, WebGLRenderingContext.BACK or WebGLRenderingContext.FRONT_AND_BACK. When WebGLRenderingContext.FRONT_AND_BACK is set, no triangles are drawn, however lines and points will.

  42. def deleteBuffer(buffer: WebGLBuffer): Unit

    Flags the specified WebGLBuffer for deletion.

    Flags the specified WebGLBuffer for deletion. When it is no longer used by the WebGL system it will be deleted.

    Note: garbage collection will also delete the buffer, it is not mandatory to call this method.

  43. def deleteFramebuffer(framebuffer: WebGLFramebuffer): Unit

    Flags the specified WebGLFramebuffer for deletion.

    Flags the specified WebGLFramebuffer for deletion. When it is no longer used by the WebGL system it will be deleted.

    Note: garbage collection will also delete the framebuffer, it is not mandatory to call this method.

  44. def deleteProgram(program: WebGLProgram): Unit

    Flags the specified WebGLProgram for deletion.

    Flags the specified WebGLProgram for deletion. When it is no longer used by the WebGL system it will be deleted.

    Note: garbage collection will also delete the program, it is not mandatory to call this method.

  45. def deleteRenderbuffer(renderbuffer: WebGLRenderbuffer): Unit

    Flags the specified WebGLRenderbuffer for deletion.

    Flags the specified WebGLRenderbuffer for deletion. When it is no longer used by the WebGL system it will be deleted.

    Note: garbage collection will also delete the renderbuffer, it is not mandatory to call this method.

  46. def deleteShader(shader: WebGLShader): Unit

    Flags the specified WebGLShader for deletion.

    Flags the specified WebGLShader for deletion. When it is no longer used by the WebGL system it will be deleted.

    Note: garbage collection will also delete the shader, it is not mandatory to call this method.

  47. def deleteTexture(texture: WebGLTexture): Unit

    Flags the specified WebGLTexture for deletion.

    Flags the specified WebGLTexture for deletion. When it is no longer used by the WebGL system it will be deleted.

    Note: garbage collection will also delete the texture, it is not mandatory to call this method.

  48. def depthFunc(func: Int): Unit

    Set the function used to discard fragments.

    Set the function used to discard fragments. When depth testing is enabled, the fragment depth is compared with the current depth, and is allowed onto the framebuffer.

    func

    the function to allow the fragment to be drawn. Values are WebGLRenderingContext.NEVER, WebGLRenderingContext.LESS, WebGLRenderingContext.EQUAL, WebGLRenderingContext.LEQUAL WebGLRenderingContext.GREATER, WebGLRenderingContext.NOTEQUAL, WebGLRenderingContext.GEQUAL, and WebGLRenderingContext.ALWAYS.

  49. def depthMask(flag: Boolean): Unit

    Enables/disables writing to the depth buffer.

    Enables/disables writing to the depth buffer.

    flag

    when false, depth writing is disabled, otherwise it is enabled.

  50. def depthRange(zNear: Double, zFar: Double): Unit

    Sets the mapping from normalized device coordinates to window coordinates.

    Sets the mapping from normalized device coordinates to window coordinates. "normalized device coordinates" in this context really means "normalized depth map values".

    note there is no requirement that zNear < zFar.

    Both parameters are clamped to -1 .. 1

    zNear

    the near clipping plane, initially 0.

    zFar

    the far clipping plane, initially 1

  51. def detachShader(program: WebGLProgram, shader: WebGLShader): Unit

    Detaches a WebGLShader from a WebGLProgram.

    Detaches a WebGLShader from a WebGLProgram.

    If the shader has been flagged as deleted by a call to WebGLRenderingContext#deleteShader, it will be deleted.

  52. def disable(cap: Int): Unit

    Disables a GL capability.

  53. def disableVertexAttribArray(index: Int): Unit

    Disables the generic vertex attribute array specified by index.

  54. def drawArrays(mode: Int, first: Int, count: Int): Unit

    Renders the primitives in the active arrays.

    Renders the primitives in the active arrays.

    mode

    the kind of primitives to render. May be WebGLRenderingContext.POINTS, WebGLRenderingContext.LINES, WebGLRenderingContext.LINE_STRIP, WebGLRenderingContext.LINE_LOOP, WebGLRenderingContext.TRIANGLES, WebGLRenderingContext.TRIANGLE_STRIP, WebGLRenderingContext.TRIANGLE_FAN, or WebGLRenderingContext.TRIANGLES

    first

    the starting index into the arrays.

    count

    the number of indices to draw.

  55. def drawElements(mode: Int, count: Int, type: Int, offset: Int): Unit

    Renders the primitives in the active arrays using an WebGLRenderingContext.ELEMENT_ARRAY_BUFFER to index them.

  56. val drawingBufferHeight: Int

    The actual height of the drawing buffer.

    The actual height of the drawing buffer. This may be different than the underlying HTMLCanvasElement height.

  57. val drawingBufferWidth: Int

    The actual width of the drawing buffer.

    The actual width of the drawing buffer. This may be different than the underlying HTMLCanvasElement width.

  58. def enable(cap: Int): Unit

    Enables a GL capability.

  59. def enableVertexAttribArray(index: Int): Unit

    Enables the generic vertex attribute array specified by index.

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  63. def finish(): Unit

    Block until all GL execution is complete.

  64. def flush(): Unit

    Force all pending GL execution to complete as soon as possible.

  65. def framebufferRenderbuffer(target: Int, attachment: Int, renderbuffertarget: Int, renderbuffer: WebGLRenderbuffer): Unit

    Attach a WebGLRenderbuffer to a WebGLFramebuffer.

    target

    must be WebGLRenderingContext.FRAMEBUFFER

    attachment

    the attachment point on the framebuffer to attach the renderbuffer. May be WebGLRenderingContext.COLOR_ATTACHMENT0, WebGLRenderingContext.DEPTH_ATTACHMENT, WebGLRenderingContext.STENCIL_ATTACHMENT, or WebGLRenderingContext.DEPTH_STENCIL_ATTACHMENT.

    renderbuffertarget

    must be WebGLRenderingContext.RENDERBUFFER

    renderbuffer

    the renderbuffer to attach.

  66. def framebufferTexture2D(target: Int, attachment: Int, textarget: Int, texture: WebGLTexture, level: Int): Unit

    Attach a WebGLTexture to a WebGLFramebuffer.

  67. def frontFace(mode: Int): Unit

    Specifies the winding that is considered front-facing for the purposes of CULL_FACE.

    Specifies the winding that is considered front-facing for the purposes of CULL_FACE.

    mode

    The winding to consider front-facing. May be WebGLRenderingContext.CW or WebGLRenderingContext.CCW

  68. def generateMipmap(target: Int): Unit

    Generate the complete set of mipmaps for the active texture derived from level 0.

    Generate the complete set of mipmaps for the active texture derived from level 0.

    target

    the texture target, may be WebGLRenderingContext.TEXTURE_2D or WebGLRenderingContext.TEXTURE_CUBE_MAP.

  69. def getActiveAttrib(program: WebGLProgram, index: Int): WebGLActiveInfo

    Returns a new WebGLActiveInfo object describing the given attribute at index.

  70. def getActiveUniform(program: WebGLProgram, index: Int): WebGLActiveInfo

    Returns a new WebGLActiveInfo object describing the given uniform at index.

  71. def getAttachedShaders(program: WebGLProgram): Array[WebGLShader]

    Returns a new array containing the shaders attached to the given program.

  72. def getAttribLocation(program: WebGLProgram, name: String): Int

    Returns the index of the named attribute, or -1 on error.

  73. def getBufferParameter(target: Int, pname: Int): Int

    Returns the value of the requested parameter for a buffer.

    Returns the value of the requested parameter for a buffer.

    target

    must be WebGLRenderingContext.ARRAY_BUFFER or WebGLRenderingContext.ELEMENT_ARRAY_BUFFER

  74. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  75. def getContextAttributes(): WebGLContextAttributes

    Returns null if isContextLost would return false, otherwise returns a copy of the context parameters.

  76. def getError(): Int

    Returns the error value, and resets the error to WebGLRenderingContext.NO_ERROR.

    Returns the error value, and resets the error to WebGLRenderingContext.NO_ERROR.

    Only the first error is recorded, new errors are not stored until the error value is reset to WebGLRenderingContext.NO_ERROR by a call to this method.

    returns

    the error code. One of WebGLRenderingContext.NO_ERROR, WebGLRenderingContext.INVALID_ENUM, WebGLRenderingContext.INVALID_VALUE, WebGLRenderingContext.INVALID_OPERATION, WebGLRenderingContext.INVALID_FRAMEBUFFER_OPERATION, or WebGLRenderingContext.OUT_OF_MEMORY.

  77. def getExtension(name: String): Any

    Returns an object for the named extension, or null if no such extension exists.

    Returns an object for the named extension, or null if no such extension exists.

    name

    the name of the extension

  78. def getFramebufferAttachmentParameter(target: Int, attachment: Int, pname: Int): Any

    Returns the value for the given parameter name on for the target and attachment.

    Returns the value for the given parameter name on for the target and attachment. The return type is dependent on the requested parameter.

    target

    must be FRAMEBUFFER

    attachment

    the attachment to examine. May be WebGLRenderingContext.COLOR_ATTACHMENT0, WebGLRenderingContext.DEPTH_ATTACHMENT, WebGLRenderingContext.STENCIL_ATTACHMENT, or WebGLRenderingContext.DEPTH_STENCIL_ATTACHMENT.

    pname

    the framebuffer attachment parameter. May be WebGLRenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, WebGLRenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, WebGLRenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, or WebGLRenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE

  79. def getParameter(pname: Int): Any

    Returns the value for the given pname.

    Returns the value for the given pname. Returns a value who's type depends on the requested parameter.

    pname

    The parameter to query. May be WebGLRenderingContext.ACTIVE_TEXTURE, WebGLRenderingContext.ALIASED_LINE_WIDTH_RANGE, WebGLRenderingContext.ALIASED_POINT_SIZE_RANGE, WebGLRenderingContext.ALPHA_BITS, WebGLRenderingContext.ARRAY_BUFFER_BINDING, WebGLRenderingContext.BLEND, WebGLRenderingContext.BLEND_COLOR, WebGLRenderingContext.BLEND_DST_ALPHA, WebGLRenderingContext.BLEND_DST_RGB, WebGLRenderingContext.BLEND_EQUATION_ALPHA, WebGLRenderingContext.BLEND_EQUATION_RGB, WebGLRenderingContext.BLEND_SRC_ALPHA, WebGLRenderingContext.BLEND_SRC_RGB, WebGLRenderingContext.BLUE_BITS, WebGLRenderingContext.COLOR_CLEAR_VALUE, WebGLRenderingContext.COLOR_WRITEMASK, WebGLRenderingContext.COMPRESSED_TEXTURE_FORMATS, WebGLRenderingContext.CULL_FACE, WebGLRenderingContext.CULL_FACE_MODE, WebGLRenderingContext.CURRENT_PROGRAM, WebGLRenderingContext.DEPTH_BITS, WebGLRenderingContext.DEPTH_CLEAR_VALUE, WebGLRenderingContext.DEPTH_FUNC, DEPTH-RANGE, WebGLRenderingContext.DEPTH_TEST, WebGLRenderingContext.DEPTH_WRITEMASK, WebGLRenderingContext.DITHER, WebGLRenderingContext.ELEMENT_ARRAY_BUFFER_BINDING, WebGLRenderingContext.FRAMEBUFFER_BINDING, WebGLRenderingContext.FRONT_FACE, WebGLRenderingContext.GENERATE_MIPMAP_HINT, WebGLRenderingContext.GREEN_BITS, WebGLRenderingContext.LINE_WIDTH, WebGLRenderingContext.MAX_COMBINED_TEXTURE_IMAGE_UNITS, WebGLRenderingContext.MAX_CUBE_MAP_TEXTURE_SIZE, WebGLRenderingContext.MAX_FRAGMENT_UNIFORM_VECTORS, WebGLRenderingContext.MAX_RENDERBUFFER_SIZE, WebGLRenderingContext.MAX_TEXTURE_IMAGE_UNITS, WebGLRenderingContext.MAX_TEXTURE_SIZE, WebGLRenderingContext.MAX_VARYING_VECTORS, WebGLRenderingContext.MAX_VERTEX_ATTRIBS, WebGLRenderingContext.MAX_VERTEX_TEXTURE_IMAGE_UNITS, WebGLRenderingContext.MAX_VERTEX_UNIFORM_VECTORS, WebGLRenderingContext.MAX_VIEWPORT_DIMS, WebGLRenderingContext.PACK_ALIGNMENT, WebGLRenderingContext.POLYGON_OFFSET_FACTOR, WebGLRenderingContext.POLYGON_OFFSET_FILL, WebGLRenderingContext.POLYGON_OFFSET_UNITS, WebGLRenderingContext.RED_BITS, WebGLRenderingContext.RENDERBUFFER_BINDING, WebGLRenderingContext.RENDERER, WebGLRenderingContext.SAMPLE_BUFFERS, WebGLRenderingContext.SAMPLE_COVERAGE_INVERT, WebGLRenderingContext.SAMPLE_COVERAGE_VALUE, WebGLRenderingContext.SAMPLES, WebGLRenderingContext.SCISSOR_BOX, WebGLRenderingContext.SCISSOR_TEST, WebGLRenderingContext.SHADING_LANGUAGE_VERSION, WebGLRenderingContext.STENCIL_BACK_FAIL, WebGLRenderingContext.STENCIL_BACK_FUNC, WebGLRenderingContext.STENCIL_BACK_PASS_DEPTH_FAIL, WebGLRenderingContext.STENCIL_BACK_PASS_DEPTH_PASS, WebGLRenderingContext.STENCIL_BACK_REF, WebGLRenderingContext.STENCIL_BACK_VALUE_MASK, WebGLRenderingContext.STENCIL_BACK_WRITEMASK, WebGLRenderingContext.STENCIL_BITS, WebGLRenderingContext.STENCIL_CLEAR_VALUE, WebGLRenderingContext.STENCIL_FAIL, WebGLRenderingContext.STENCIL_FUNC, WebGLRenderingContext.STENCIL_PASS_DEPTH_FAIL, WebGLRenderingContext.STENCIL_PASS_DEPTH_PASS, WebGLRenderingContext.STENCIL_REF, WebGLRenderingContext.STENCIL_TEST, WebGLRenderingContext.STENCIL_VALUE_MASK, WebGLRenderingContext.STENCIL_WRITEMASK, WebGLRenderingContext.SUBPIXEL_BITS, WebGLRenderingContext.TEXTURE_BINDING_2D, WebGLRenderingContext.TEXTURE_BINDING_CUBE_MAP, WebGLRenderingContext.UNPACK_ALIGNMENT, WebGLRenderingContext.UNPACK_COLORSPACE_CONVERSION_WEBGL, WebGLRenderingContext.UNPACK_FLIP_Y_WEBGL, WebGLRenderingContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL, WebGLRenderingContext.VENDOR, WebGLRenderingContext.VERSION or WebGLRenderingContext.VIEWPORT.

  80. def getProgramInfoLog(program: WebGLProgram): String

    Returns a string containing information about the last link or validation operation for a program.

  81. def getProgramParameter(program: WebGLProgram, pname: Int): Any

    Returns the value for the given parameter name for the program.

    Returns the value for the given parameter name for the program. The return type is dependent on the requested parameter.

    program

    the program to query.

    pname

    the parameter to get, may be one of WebGLRenderingContext.DELETE_STATUS, WebGLRenderingContext.LINK_STATUS, WebGLRenderingContext.VALIDATE_STATUS, WebGLRenderingContext.ATTACHED_SHADERS, WebGLRenderingContext.ACTIVE_ATTRIBUTES, or WebGLRenderingContext.ACTIVE_UNIFORMS.

  82. def getRenderbufferParameter(target: Int, pname: Int): Any

    Returns the value of a parameter on the active renderbuffer.

  83. def getShaderInfoLog(shader: WebGLShader): String

    Returns the information log from the last compile of the shader.

  84. def getShaderParameter(shader: WebGLShader, pname: Int): Any

    Returns the value of a parameter on the specified WebGLShader.

    Returns the value of a parameter on the specified WebGLShader. The return type is dependent on the requested parameter.

    shader

    the shader to query

    pname

    the parameter to get, may be one of WebGLRenderingContext.SHADER_TYPE, WebGLRenderingContext.DELETE_STATUS or WebGLRenderingContext.COMPILE_STATUS

  85. def getShaderPrecisionFormat(shadertype: Int, precisiontype: Int): WebGLShaderPrecisionFormat

    Returns a new WebGLShaderPrecisionFormat for the given shader type and precision type.

  86. def getShaderSource(shader: WebGLShader): String

    Returns the source of the given shader.

  87. def getSupportedExtensions(): Array[String]

    Returns an array of strings naming supported WebGL extensions.

  88. def getTexParameter(target: Int, pname: Int): Any

    Returns the value of the given texture parameter on the target of the active texture.

    Returns the value of the given texture parameter on the target of the active texture.

    target

    the target to query. May be either WebGLRenderingContext.TEXTURE_2D or TEXTURE_CUBE_MAP'.

    pname

    the parameter to query. May be either WebGLRenderingContext.TEXTURE_MAG_FILTER, WebGLRenderingContext.TEXTURE_MIN_FILTER, WebGLRenderingContext.TEXTURE_WRAP_S, or WebGLRenderingContext.TEXTURE_WRAP_T.

  89. def getUniform(program: WebGLProgram, location: WebGLUniformLocation): Any

    Returns the value of the uniform in the given program and location.

    Returns the value of the uniform in the given program and location. The return type is dependent on the uniform type.

  90. def getUniformLocation(program: WebGLProgram, name: String): WebGLUniformLocation

    Returns a new WebGLUniformLocation that represents the location of the given uniform in the specified program.

    Returns a new WebGLUniformLocation that represents the location of the given uniform in the specified program. If the uniform does not exist, or another error occurs, returns null.

  91. def getVertexAttrib(index: Int, pname: Int): Any

    Returns the value of the named parameter for a given vertex attribute index.

  92. def getVertexAttribOffset(index: Int, pname: Int): Int

    Returns the offset of the vertex attribute.

    Returns the offset of the vertex attribute.

    index

    the index of the vertex attribute to retrieve

    pname

    must be WebGLRenderingContext.VERTEX_ATTRIB_ARRAY_POINTER

  93. def hasOwnProperty(v: String): Boolean

    Definition Classes
    Object
  94. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  95. def hint(target: Int, mode: Int): Unit

    Specifies implementation specific hints.

    Specifies implementation specific hints.

    target

    the hint to specify. Must be WebGLRenderingContext.GENERATE_MIPMAP_HINT

    mode

    the desired mode. Must be one of WebGLRenderingContext.FASTEST, WebGLRenderingContext.NICEST, or WebGLRenderingContext.DONT_CARE.

  96. def isBuffer(buffer: Any): Boolean

    Returns true if the buffer is valid, false otherwise.

  97. def isContextLost(): Boolean

    Returns true if the context has been lost, false otherwise.

  98. def isEnabled(cap: Int): Boolean

    Returns true if the specified capability is enabled, false otherwise.

    Returns true if the specified capability is enabled, false otherwise.

    See also

    WebGLRenderingContext#enable

  99. def isFramebuffer(framebuffer: Any): Boolean

    Returns true if the framebuffer is valid, false otherwise.

  100. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  101. def isProgram(program: Any): Boolean

    Returns true if the program is valid, false otherwise.

  102. def isPrototypeOf(v: Object): Boolean

    Definition Classes
    Object
  103. def isRenderbuffer(renderbuffer: Any): Boolean

    Returns true if the renderbuffer is valid, false otherwise.

  104. def isShader(shader: Any): Boolean

    Returns true if the shader is valid, false otherwise.

  105. def isTexture(texture: Any): Boolean

    Returns true if the texture is valid, false otherwise.

  106. def lineWidth(width: Int): Unit

    Specifies the line width.

  107. def linkProgram(program: WebGLProgram): Unit

    Attempts to link the specified WebGLProgram.

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

    Definition Classes
    AnyRef
  109. final def notify(): Unit

    Definition Classes
    AnyRef
  110. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  111. def pixelStorei(pname: Int, param: Int): Unit

    Sets the pixel store mode, used when copying image data such as framebuffers or textures.

  112. def polygonOffset(factor: Int, units: Int): Unit

    Specifies the polygon offset.

    Specifies the polygon offset. When WebGLRenderingContext.POLYGON_OFFSET_FILL is enabled, depth values for a fragment have an offset applied to them, calculated as factor*DZ + r*units, where DZ is the change in z based on the polygon's screen area, and r is the minimum value that is guaranteed produce a measurable offset.

  113. def propertyIsEnumerable(v: String): Boolean

    Definition Classes
    Object
  114. def readPixels(x: Int, y: Int, width: Int, height: Int, format: Int, type: Int, pixels: ArrayBufferView): Unit

    Reads pixels from the framebuffer into pixels.

    Reads pixels from the framebuffer into pixels.

    x

    the x coordinate of the bottom left of the area to read.

    y

    the y coordinate of the bottom left of the area to read.

    width

    the width of the area to read.

    height

    the height of the area to read.

    format

    the format of the desired output. Must be one of WebGLRenderingContext.UNSIGNED_BYTE, WebGLRenderingContext.UNSIGNED_SHORT_4_4_4_4, WebGLRenderingContext.UNSIGNED_SHORT_5_5_5_1, WebGLRenderingContext.UNSIGNED_SHORT_5_6_5

  115. def renderbufferStorage(target: Int, internalformat: Int, width: Int, height: Int): Unit

    Create renderbuffer image storage.

    Create renderbuffer image storage.

    Initializes the renderbuffer to use the new storage format, replacing any previous store.

    target

    must be WebGLRenderingContext.RENDERBUFFER

    internalformat

    specifies the format of the renderbuffer. May be one of WebGLRenderingContext.RGBA4, WebGLRenderingContext.RGB565, WebGLRenderingContext.RGB5_A1, WebGLRenderingContext.DEPTH_COMPONENT16, WebGLRenderingContext.STENCIL_INDEX8 or WebGLRenderingContext.DEPTH_STENCIL.

  116. def sampleCoverage(value: Int, invert: Boolean): Unit

    Sets the sampling coverage parameters for primitive antialiasing.

    Sets the sampling coverage parameters for primitive antialiasing.

    The OpenGL multisampling algorithm is too involved to concisely explain here. Please consult http://www.opengl.org/registry/specs/SGIS/multisample.txt.

    value

    the sample coverage value, clamped to 0..1.

    invert

    if true, the mask will be bitwise-inverted.

  117. def scissor(x: Int, y: Int, width: Int, height: Int): Unit

    Sets the scissor rectangle.

    Sets the scissor rectangle. When WebGLRenderingContext.SCISSOR_TEST is enabled, rendering will be restricted to this rectangle.

  118. def shaderSource(shader: WebGLShader, source: String): Unit

    Sets the GLSL source for the given shader.

  119. def stencilFunc(func: Int, ref: Int, mask: Int): Unit

    Sets the stencil test for front and back faces.

    Sets the stencil test for front and back faces.

    func

    the test function. One of WebGLRenderingContext.NEVER, WebGLRenderingContext.LESS, WebGLRenderingContext.LEQUAL, WebGLRenderingContext.GREATER, WebGLRenderingContext.GEQUAL, WebGLRenderingContext.EQUAL, WebGLRenderingContext.NOTEQUAL, and WebGLRenderingContext.ALWAYS

    ref

    the reference value to test against in the stencil buffer

    mask

    mask that is ANDed with ref and the tested value and stored in the stencil buffer.

  120. def stencilFuncSeparate(face: Int, func: Int, ref: Int, mask: Int): Unit

    Sets the stencil test for the given face type.

    Sets the stencil test for the given face type.

    face

    the face(s) to configure the test for. May be WebGLRenderingContext.FRONT, WebGLRenderingContext.BACK or WebGLRenderingContext.FRONT_AND_BACK.

    func

    the test function. One of WebGLRenderingContext.NEVER, WebGLRenderingContext.LESS, WebGLRenderingContext.LEQUAL, WebGLRenderingContext.GREATER, WebGLRenderingContext.GEQUAL, WebGLRenderingContext.EQUAL, WebGLRenderingContext.NOTEQUAL, and WebGLRenderingContext.ALWAYS

    ref

    the reference value to test against in the stencil buffer

    mask

    mask that is ANDed with ref and the tested value and stored in the stencil buffer.

  121. def stencilMask(mask: Int): Unit

    Configure which bits in the stencil buffer may be written to by front or back faces.

    Configure which bits in the stencil buffer may be written to by front or back faces.

    mask

    the write mask. Set bits are allowed to be written to the corresponding stencil buffer bit.

  122. def stencilMaskSeparate(face: Int, mask: Int): Unit

    Configure which bits in the stencil buffer may be written to by the given face type.

    Configure which bits in the stencil buffer may be written to by the given face type.

    face

    the face(s) to configure the mask for. May be WebGLRenderingContext.FRONT, WebGLRenderingContext.BACK or WebGLRenderingContext.FRONT_AND_BACK.

    mask

    the write mask. Set bits are allowed to be written to the corresponding stencil buffer bit.

  123. def stencilOp(fail: Int, zfail: Int, zpass: Int): Unit

    Configure the effect of a stencil or depth test failing for front or back faces.

    Configure the effect of a stencil or depth test failing for front or back faces.

    fail

    the effect of the stencil test failing. May be one of WebGLRenderingContext.KEEP, WebGLRenderingContext.ZERO, WebGLRenderingContext.REPLACE, WebGLRenderingContext.INCR, WebGLRenderingContext.INCR_WRAP, WebGLRenderingContext.DECR, WebGLRenderingContext.DECR_WRAP, and WebGLRenderingContext.INVERT

    zfail

    the effect of the stencil test passing but the depth test failing. Parameters are as fail.

    zpass

    the effect of the stencil test failing but the depth test passing. Parameters are as fail.

  124. def stencilOpSeparate(face: Int, fail: Int, zfail: Int, zpass: Int): Unit

    Configure the effect of a stencil or depth test failing for the specified faces.

    Configure the effect of a stencil or depth test failing for the specified faces.

    face

    the face(s) to configure the stencil operation for. May be WebGLRenderingContext.FRONT, WebGLRenderingContext.BACK or WebGLRenderingContext.FRONT_AND_BACK.

    fail

    the effect of the stencil test failing. May be one of WebGLRenderingContext.KEEP, WebGLRenderingContext.ZERO, WebGLRenderingContext.REPLACE, WebGLRenderingContext.INCR, WebGLRenderingContext.INCR_WRAP, WebGLRenderingContext.DECR, WebGLRenderingContext.DECR_WRAP, and WebGLRenderingContext.INVERT

    zfail

    the effect of the stencil test passing but the depth test failing. Parameters are as fail.

    zpass

    the effect of the stencil test failing but the depth test passing. Parameters are as fail.

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

    Definition Classes
    AnyRef
  126. def texImage2D(target: Int, level: Int, internalformat: Int, format: Int, type: Int, pixels: HTMLVideoElement): Unit

    Loads a 2-dimensional texture into a texture unit from an HTMLVideoElement object.

    Loads a 2-dimensional texture into a texture unit from an HTMLVideoElement object.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    internalformat

    the format to store the image.

    pixels

    the source image data.

  127. def texImage2D(target: Int, level: Int, internalformat: Int, format: Int, type: Int, pixels: HTMLCanvasElement): Unit

    Loads a 2-dimensional texture into a texture unit from an HTMLCanvasElement object.

    Loads a 2-dimensional texture into a texture unit from an HTMLCanvasElement object.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    internalformat

    the format to store the image.

    pixels

    the source image data.

  128. def texImage2D(target: Int, level: Int, internalformat: Int, format: Int, type: Int, pixels: HTMLImageElement): Unit

    Loads a 2-dimensional texture into a texture unit from an HTMLImageElement object.

    Loads a 2-dimensional texture into a texture unit from an HTMLImageElement object.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    internalformat

    the format to store the image.

    pixels

    the source image data.

  129. def texImage2D(target: Int, level: Int, internalformat: Int, format: Int, type: Int, pixels: ImageData): Unit

    Loads a 2-dimensional texture into a texture unit from an ImageData object.

    Loads a 2-dimensional texture into a texture unit from an ImageData object.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    internalformat

    the format to store the image.

    pixels

    the source image data.

  130. def texImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, format: Int, type: Int, pixels: ArrayBufferView): Unit

    Loads a 2-dimensional texture into a texture unit from source data.

    Loads a 2-dimensional texture into a texture unit from source data.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    internalformat

    the format the image is stored in.

    width

    the width of the texture image.

    height

    the height of the texture image.

    border

    the border width. Must be 0.

    pixels

    the source image data.

  131. def texParameterf(target: Int, pname: Int, param: Int): Unit

    Sets the texture parameter for the active texture unit.

    Sets the texture parameter for the active texture unit.

    target

    the texture target to configure. May be WebGLRenderingContext.TEXTURE_2D or WebGLRenderingContext.TEXTURE_CUBE_MAP

    pname

    the parameter to change. May be WebGLRenderingContext.TEXTURE_MIN_FILTER, WebGLRenderingContext.TEXTURE_MAG_FILTER WebGLRenderingContext.TEXTURE_WRAP_S, or WebGLRenderingContext.TEXTURE_WRAP_T

    param

    the value to set. See the corresponding parameters for valid values.

  132. def texParameteri(target: Int, pname: Int, param: Int): Unit

    Sets the texture parameter for the active texture unit.

    Sets the texture parameter for the active texture unit.

    target

    the texture target to configure. May be WebGLRenderingContext.TEXTURE_2D or WebGLRenderingContext.TEXTURE_CUBE_MAP

    pname

    the parameter to change. May be WebGLRenderingContext.TEXTURE_MIN_FILTER, WebGLRenderingContext.TEXTURE_MAG_FILTER WebGLRenderingContext.TEXTURE_WRAP_S, or WebGLRenderingContext.TEXTURE_WRAP_T

    param

    the value to set. See the corresponding parameters for valid values.

  133. def texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, format: Int, type: Int, pixels: HTMLVideoElement): Unit

    Loads a 2-dimensional texture subimage into a texture unit from an HTMLVideoElement.

    Loads a 2-dimensional texture subimage into a texture unit from an HTMLVideoElement.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    xoffset

    the x texel offset into the texture image.

    yoffset

    the y texel offset into the texture image.

    pixels

    the image data.

  134. def texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, format: Int, type: Int, pixels: HTMLCanvasElement): Unit

    Loads a 2-dimensional texture subimage into a texture unit from an HTMLCanvasElement.

    Loads a 2-dimensional texture subimage into a texture unit from an HTMLCanvasElement.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    xoffset

    the x texel offset into the texture image.

    yoffset

    the y texel offset into the texture image.

    pixels

    the image data.

  135. def texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, format: Int, type: Int, pixels: HTMLImageElement): Unit

    Loads a 2-dimensional texture subimage into a texture unit from an HTMLImageElement.

    Loads a 2-dimensional texture subimage into a texture unit from an HTMLImageElement.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    xoffset

    the x texel offset into the texture image.

    yoffset

    the y texel offset into the texture image.

    pixels

    the image data.

  136. def texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, format: Int, type: Int, pixels: ImageData): Unit

    Loads a 2-dimensional texture subimage into a texture unit from an ImageData object.

    Loads a 2-dimensional texture subimage into a texture unit from an ImageData object.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    xoffset

    the x texel offset into the texture image.

    yoffset

    the y texel offset into the texture image.

    pixels

    the image data.

  137. def texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, type: Int, pixels: ArrayBufferView): Unit

    Loads a 2-dimensional texture subimage into a texture unit from an ArrayBufferView.

    Loads a 2-dimensional texture subimage into a texture unit from an ArrayBufferView.

    target

    the target on the active texture unit. May be WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y, WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z, or WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z

    level

    the mipmap level of detail. 0 is the base image.

    xoffset

    the x texel offset into the texture image.

    yoffset

    the y texel offset into the texture image.

    width

    the width of the texture image.

    height

    the height of the texture image.

    pixels

    the image data.

  138. def toLocaleString(): String

    Definition Classes
    Object
  139. def toString(): String

    Definition Classes
    AnyRef → Any
  140. def uniform1f(location: WebGLUniformLocation, x: Double): Unit

    Loads a a scalar float into a WebGLUniformLocation.

    Loads a a scalar float into a WebGLUniformLocation.

    location

    the location to bind.

    x

    the scalar to bind to.

  141. def uniform1fv(location: WebGLUniformLocation, v: Array[Double]): Unit

    Loads a a scalar float into a WebGLUniformLocation.

    Loads a a scalar float into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a js.Array to bind to.

  142. def uniform1fv(location: WebGLUniformLocation, v: Float32Array): Unit

    Loads a a scalar float into a WebGLUniformLocation.

    Loads a a scalar float into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a Float32Array to bind to

  143. def uniform1i(location: WebGLUniformLocation, x: Int): Unit

    Loads a a scalar integer into a WebGLUniformLocation.

    Loads a a scalar integer into a WebGLUniformLocation.

    location

    the location to bind.

    x

    the scalar to bind to.

  144. def uniform1iv(location: WebGLUniformLocation, v: Array[Int]): Unit

    Loads a a scalar integer into a WebGLUniformLocation.

    Loads a a scalar integer into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a js.Array to bind to

  145. def uniform1iv(location: WebGLUniformLocation, v: Int32Array): Unit

    Loads a a scalar integer into a WebGLUniformLocation.

    Loads a a scalar integer into a WebGLUniformLocation.

    location

    the location to bind.

    v

    an Int32Array to bind to

  146. def uniform2f(location: WebGLUniformLocation, x: Double, y: Double): Unit

    Loads a a 2-vector of floats into a WebGLUniformLocation.

    Loads a a 2-vector of floats into a WebGLUniformLocation.

    location

    the location to bind.

    x

    the first float component

    y

    the second float component

  147. def uniform2fv(location: WebGLUniformLocation, v: Array[Double]): Unit

    Loads a a 2-vector of floats

    Loads a a 2-vector of floats

    location

    the location to bind into a WebGLUniformLocation.

    v

    a js.Array to bind to.

  148. def uniform2fv(location: WebGLUniformLocation, v: Float32Array): Unit

    Loads a a 2-vector of floats into a WebGLUniformLocation.

    Loads a a 2-vector of floats into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a Float32Array to bind to

  149. def uniform2i(location: WebGLUniformLocation, x: Int, y: Int): Unit

    Loads a a 2-vector of integers into a WebGLUniformLocation.

    Loads a a 2-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    x

    the first integer component

    y

    the second integer component

  150. def uniform2iv(location: WebGLUniformLocation, v: Array[Int]): Unit

    Loads a a 2-vector of integers into a WebGLUniformLocation.

    Loads a a 2-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a js.Array to bind to

  151. def uniform2iv(location: WebGLUniformLocation, v: Int32Array): Unit

    Loads a a 2-vector of integers into a WebGLUniformLocation.

    Loads a a 2-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    v

    an Int32Array to bind to

  152. def uniform3f(location: WebGLUniformLocation, x: Double, y: Double, z: Double): Unit

    Loads a a 3-vector of floats into a WebGLUniformLocation.

    Loads a a 3-vector of floats into a WebGLUniformLocation.

    location

    the location to bind.

    x

    the first float component.

    y

    the second float component.

    z

    the third float component.

  153. def uniform3fv(location: WebGLUniformLocation, v: Array[Double]): Unit

    Loads a a 3-vector of floats into a WebGLUniformLocation.

    Loads a a 3-vector of floats into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a js.Array to bind to.

  154. def uniform3fv(location: WebGLUniformLocation, v: Float32Array): Unit

    Loads a a 3-vector of floats into a WebGLUniformLocation.

    Loads a a 3-vector of floats into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a Float32Array to bind to

  155. def uniform3i(location: WebGLUniformLocation, x: Int, y: Int, z: Int): Unit

    Loads a a 3-vector of integers into a WebGLUniformLocation.

    Loads a a 3-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    x

    the first integer component

    y

    the second integer component

    z

    the third integer component

  156. def uniform3iv(location: WebGLUniformLocation, v: Array[Int]): Unit

    Loads a a 3-vector of integers into a WebGLUniformLocation.

    Loads a a 3-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a js.Array to bind to

  157. def uniform3iv(location: WebGLUniformLocation, v: Int32Array): Unit

    Loads a a 3-vector of integers into a WebGLUniformLocation.

    Loads a a 3-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    v

    an Int32Array to bind to

  158. def uniform4f(location: WebGLUniformLocation, x: Double, y: Double, z: Double, w: Double): Unit

    Loads a a 4-vector of floats into a WebGLUniformLocation.

    Loads a a 4-vector of floats into a WebGLUniformLocation.

    location

    the location to bind.

    x

    the first float component.

    y

    the second float component.

    z

    the third float component.

    w

    the fourth float component.

  159. def uniform4fv(location: WebGLUniformLocation, v: Array[Double]): Unit

    Loads a a 4-vector of floats into a WebGLUniformLocation.

    Loads a a 4-vector of floats into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a js.Array to bind to.

  160. def uniform4fv(location: WebGLUniformLocation, v: Float32Array): Unit

    Loads a a 4-vector of floats into a WebGLUniformLocation.

    Loads a a 4-vector of floats into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a Float32Array to bind to

  161. def uniform4i(location: WebGLUniformLocation, x: Int, y: Int, z: Int, w: Int): Unit

    Loads a a 4-vector of integers into a WebGLUniformLocation.

    Loads a a 4-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    x

    the first integer component

    y

    the second integer component

    z

    the third integer component

    w

    the third integer component

  162. def uniform4iv(location: WebGLUniformLocation, v: Array[Int]): Unit

    Loads a a 4-vector of integers into a WebGLUniformLocation.

    Loads a a 4-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    v

    a js.Array to bind to

  163. def uniform4iv(location: WebGLUniformLocation, v: Int32Array): Unit

    Loads a a 4-vector of integers into a WebGLUniformLocation.

    Loads a a 4-vector of integers into a WebGLUniformLocation.

    location

    the location to bind.

    v

    an Int32Array to bind to

  164. def uniformMatrix2fv(location: WebGLUniformLocation, transpose: Boolean, value: Array[Double]): Unit

    Loads a a 4x2 matrix into a WebGLUniformLocation.

    Loads a a 4x2 matrix into a WebGLUniformLocation.

    location

    the location to bind.

    transpose

    if true, the matrix will loaded into the uniform transposed.

    value

    the source js.Array containing the matrix data.

  165. def uniformMatrix2fv(location: WebGLUniformLocation, transpose: Boolean, value: Float32Array): Unit

    Loads a a 4x2 matrix into a WebGLUniformLocation.

    Loads a a 4x2 matrix into a WebGLUniformLocation.

    location

    the location to bind.

    transpose

    if true, the matrix will loaded into the uniform transposed.

    value

    the source Float32Array containing the matrix data.

  166. def uniformMatrix3fv(location: WebGLUniformLocation, transpose: Boolean, value: Array[Double]): Unit

    Loads a a 4x3 matrix into a WebGLUniformLocation.

    Loads a a 4x3 matrix into a WebGLUniformLocation.

    location

    the location to bind.

    transpose

    if true, the matrix will loaded into the uniform transposed.

    value

    the source js.Array containing the matrix data.

  167. def uniformMatrix3fv(location: WebGLUniformLocation, transpose: Boolean, value: Float32Array): Unit

    Loads a a 4x3 matrix into a WebGLUniformLocation.

    Loads a a 4x3 matrix into a WebGLUniformLocation.

    location

    the location to bind.

    transpose

    if true, the matrix will loaded into the uniform transposed.

    value

    the source Float32Array containing the matrix data.

  168. def uniformMatrix4fv(location: WebGLUniformLocation, transpose: Boolean, value: Array[Double]): Unit

    Loads a a 4x4 matrix into a WebGLUniformLocation.

    Loads a a 4x4 matrix into a WebGLUniformLocation.

    location

    the location to bind.

    transpose

    if true, the matrix will loaded into the uniform transposed.

    value

    the source js.Array containing the matrix data.

  169. def uniformMatrix4fv(location: WebGLUniformLocation, transpose: Boolean, value: Float32Array): Unit

    Loads a a 4x4 matrix into a WebGLUniformLocation.

    Loads a a 4x4 matrix into a WebGLUniformLocation.

    location

    the location to bind.

    transpose

    if true, the matrix will loaded into the uniform transposed.

    value

    the source Float32Array containing the matrix data.

  170. def useProgram(program: WebGLProgram): Unit

    Makes a WebGLProgram become the active program.

  171. def validateProgram(program: WebGLProgram): Unit

    Validates a WebGLProgram.

  172. def valueOf(): Any

    Definition Classes
    Object
  173. def vertexAttrib1f(indx: Int, x: Double): Unit

    Loads a scalar into a vertex attribute.

    Loads a scalar into a vertex attribute.

    indx

    the index of the attribute.

    x

    the scalar to load.

  174. def vertexAttrib1fv(indx: Int, values: Array[Double]): Unit

    Loads a scalar into a vertex attribute.

    Loads a scalar into a vertex attribute.

    indx

    the index of the attribute.

    values

    the source array for the attribute.

  175. def vertexAttrib1fv(indx: Int, values: Float32Array): Unit

    Loads a scalar into a vertex attribute.

    Loads a scalar into a vertex attribute.

    indx

    the index of the attribute.

    values

    the source array for the attribute.

  176. def vertexAttrib2f(indx: Int, x: Double, y: Double): Unit

    Loads a 2-vector into a vertex attribute.

    Loads a 2-vector into a vertex attribute.

    indx

    the index of the attribute.

    x

    the first component.

    y

    the second component.

  177. def vertexAttrib2fv(indx: Int, values: Array[Double]): Unit

    Loads a 2-vector into a vertex attribute.

    Loads a 2-vector into a vertex attribute.

    indx

    the index of the attribute.

    values

    the source array for the attribute.

  178. def vertexAttrib2fv(indx: Int, values: Float32Array): Unit

    Loads a 2-vector into a vertex attribute.

    Loads a 2-vector into a vertex attribute.

    indx

    the index of the attribute.

    values

    the source array for the attribute.

  179. def vertexAttrib3f(indx: Int, x: Double, y: Double, z: Double): Unit

    Loads a 3-vector into a vertex attribute.

    Loads a 3-vector into a vertex attribute.

    indx

    the index of the attribute.

    x

    the first component.

    y

    the second component.

    z

    the third component.

  180. def vertexAttrib3fv(indx: Int, values: Array[Double]): Unit

    Loads a 3-vector into a vertex attribute.

    Loads a 3-vector into a vertex attribute.

    indx

    the index of the attribute.

    values

    the source array for the attribute.

  181. def vertexAttrib3fv(indx: Int, values: Float32Array): Unit

    Loads a 3-vector into a vertex attribute.

    Loads a 3-vector into a vertex attribute.

    indx

    the index of the attribute.

    values

    the source array for the attribute.

  182. def vertexAttrib4f(indx: Int, x: Double, y: Double, z: Double, w: Double): Unit

    Loads a 4-vector into a vertex attribute.

    Loads a 4-vector into a vertex attribute.

    indx

    the index of the attribute.

    x

    the first component.

    y

    the second component.

    z

    the third component.

    w

    the fourth component.

  183. def vertexAttrib4fv(indx: Int, values: Array[Double]): Unit

    Loads a 4-vector into a vertex attribute.

    Loads a 4-vector into a vertex attribute.

    indx

    the index of the attribute.

    values

    the source array for the attribute.

  184. def vertexAttrib4fv(indx: Int, values: Float32Array): Unit

    Loads a 4-vector into a vertex attribute.

    Loads a 4-vector into a vertex attribute.

    indx

    the index of the attribute.

    values

    the source array for the attribute.

  185. def vertexAttribPointer(indx: Int, size: Int, type: Int, normalized: Boolean, stride: Int, offset: Int): Unit

    Defines an array of generic vertex attribute data.

    Defines an array of generic vertex attribute data.

    indx

    the index of the attribute

    size

    the number of components per attribute. Must be 1..4

    type

    the datatype for each component, may be WebGLRenderingContext.BYTE, WebGLRenderingContext.UNSIGNED_BYTE, WebGLRenderingContext.SHORT, WebGLRenderingContext.UNSIGNED_SHORT, or WebGLRenderingContext.FLOAT.

    normalized

    if true, values are normalized on access, otherwise they are converted to fixed point values on access.

    stride

    the gap between attributes. 0 would be packed together.

    offset

    the offset to the first component in the array.

  186. def viewport(x: Double, y: Double, width: Double, height: Double): Unit

    Sets the OpenGL viewport to render within.

  187. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped