Options
All
  • Public
  • Public/Protected
  • All
Menu

webgl-operate

Index

Type aliases

Fragment

Fragment: [number, number, FragmentType]

GLubyte

GLubyte: number
todo

remove this when webgl types are working again.

Line

Line: [number, number, number]

StringPairs

StringPairs: Map<string, string>

TexImage2DData

TexImage2DData: GLintptr | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap | ImageData | ArrayBufferView | undefined

TexImage3DData

TexImage3DData: GLintptr | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap | ImageData | ArrayBufferView | undefined

Variables

DISABLE_ASSERTIONS

DISABLE_ASSERTIONS: boolean

If true, assertions immediately return on invocation (variable can be set via webpack define plugin).

GIT_REV_BRANCH

GIT_REV_BRANCH: string

GIT_REV_COMMIT

GIT_REV_COMMIT: string

GIT_REV_VERSION

GIT_REV_VERSION: string

Provided via the git-revision-webgl-operate and define plugins.

LOG_VERBOSITY_THRESHOLD

LOG_VERBOSITY_THRESHOLD: number

If defined, logs of equal or higher verbosity level are skipped (variable can be set via webpack define plugin).

Const branch

branch: undefined | string = typeof GIT_REV_BRANCH !== 'undefined' ? `${GIT_REV_BRANCH}` : undefined

gloperate.branch provides the git revision branch at build-time.

Const commit

commit: undefined | string = typeof GIT_REV_COMMIT !== 'undefined' ? `${GIT_REV_COMMIT}` : undefined

gloperate.commit provides the git revision commit at build-time.

Const version

version: undefined | string = typeof GIT_REV_VERSION !== 'undefined' ? `${GIT_REV_VERSION}` : undefined

gloperate.version provides the git revision version at build-time.

Functions

byteSizeOfFormat

  • byteSizeOfFormat(context: Context, format: GLenum): number
  • Provides the size in bytes of certain WebGL format enumerator. Please note that some byte sizes might vary based on context attributes or the bound render, thus, DEPTH_COMPONENT and DEPTH_STENCIL are not covered by this function. This function does NOT cover data types that are usually on CPU side, not GPU, e.g., UNSIGNED_BYTE, UNSIGNED_SHORT_5_6_5, HALF_FLOAT, UNSIGNED_SHORT, FLOAT, etc. and will assert when provided with types.

    Parameters

    • context: Context

      The OpenGL context.

    • format: GLenum

      Format identifier of the target internal OpenGL data type.

    Returns number

    • The size in bytes of one type instance on the GPU.