Skip to main content

Function: createTextureFromImage()

createTextureFromImage(gl, image): WebGLTexture

Defined in: rendering/shaders/utils/create-texture-from-image.ts:8

Creates a WebGL texture from an image.

Parameters

gl

WebGL2RenderingContext

The WebGL2 rendering context.

image

TexImageSource

The image source to create the texture from.

Returns

WebGLTexture

The created WebGL texture.