Skip to main content

webgl

Index

Functions

getAttributeComponentSize

  • getAttributeComponentSize(gl: WebGLRenderingContext, type: number): number

getAttributePointerType

  • getAttributePointerType(gl: WebGLRenderingContext, type: number): 5126 | 5122 | 5123 | 5121 | 5120

getGLTypeFromSource

  • getGLTypeFromSource(gl: WebGLRenderingContext, source: string, variable: string): 5126 | 5124 | 5125 | 35670 | 5122 | 5123 | 5121 | 5120
  • Attempt to discern the glType of an attribute from vertex source


    Parameters

    • gl: WebGLRenderingContext
    • source: string
    • variable: string

    Returns 5126 | 5124 | 5125 | 35670 | 5122 | 5123 | 5121 | 5120

getGlTypeSizeBytes

  • getGlTypeSizeBytes(gl: WebGLRenderingContext, type: number): number
  • Return the size of the GlType in bytes


    Parameters

    • gl: WebGLRenderingContext
    • type: number

    Returns number

isAttributeInSource

  • isAttributeInSource(source: string, variable: string): boolean
  • Checks if an attribute is present in vertex source


    Parameters

    • source: string
    • variable: string

    Returns boolean