Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GLTexture

Hierarchy

  • GLTexture

Index

Constructors

constructor

  • new GLTexture(gl: WebGLRenderingContext, width?: number, height?: number, format?: number, type?: number): GLTexture
  • Parameters

    • gl: WebGLRenderingContext
    • Optional width: number
    • Optional height: number
    • Optional format: number
    • Optional type: number

    Returns GLTexture

Properties

format

format: number

gl

gl: WebGLRenderingContext

height

height: number

mipmap

mipmap: boolean

premultiplyAlpha

premultiplyAlpha: boolean

texture

texture: WebGLTexture

type

type: number

width

width: number

Methods

bind

  • bind(location?: number): void
  • Parameters

    • Optional location: number

    Returns void

destroy

  • destroy(): void
  • Returns void

enableLinearScaling

  • enableLinearScaling(): void
  • Returns void

enableMipmap

  • enableMipmap(): void
  • Returns void

enableNearestScaling

  • enableNearestScaling(): void
  • Returns void

enableWrapClamp

  • enableWrapClamp(): void
  • Returns void

enableWrapMirrorRepeat

  • enableWrapMirrorRepeat(): void
  • Returns void

enableWrapRepeat

  • enableWrapRepeat(): void
  • Returns void

magFilter

  • magFilter(linear: boolean): void
  • Parameters

    • linear: boolean

    Returns void

minFilter

  • minFilter(linear: boolean): void
  • Parameters

    • linear: boolean

    Returns void

unbind

  • unbind(): void
  • Returns void

upload

  • upload(source: HTMLImageElement | ImageData | HTMLVideoElement | HTMLCanvasElement): void
  • Parameters

    • source: HTMLImageElement | ImageData | HTMLVideoElement | HTMLCanvasElement

    Returns void

uploadData

  • uploadData(data: ArrayBuffer | ArrayBufferView, width: number, height: number): void
  • Parameters

    • data: ArrayBuffer | ArrayBufferView
    • width: number
    • height: number

    Returns void

Static fromData

  • fromData(gl: WebGLRenderingContext, data: number[], width: number, height: number): GLTexture
  • Parameters

    • gl: WebGLRenderingContext
    • data: number[]
    • width: number
    • height: number

    Returns GLTexture

Static fromSource

  • fromSource(gl: WebGLRenderingContext, source: HTMLImageElement | ImageData | HTMLVideoElement | HTMLCanvasElement, premultipleAlpha?: boolean): GLTexture
  • Parameters

    • gl: WebGLRenderingContext
    • source: HTMLImageElement | ImageData | HTMLVideoElement | HTMLCanvasElement
    • Optional premultipleAlpha: boolean

    Returns GLTexture

Generated using TypeDoc