The driver texture implementation.
Protected
Readonly
driverThe driver texture implementation.
Protected
Readonly
texture1x1 pixel white texture. To be used as placeholder/default texture.
Create a texture directly from an ImageBitmap
.
Image bitmap
Optional
resourceOptions: ResourceOptionsOptions for the created resource
Promise of the resulting TextureHandle
Fetch an ImageBitmap
from the given URL and create a texture from it.
URL
Optional
resourceOptions: ResourceOptionsOptional
options: { fetchOptions?: RequestInit; imageBitmapOptions?: ImageBitmapOptions }Options for the fetch
request/created resource
Promise of the resulting TextureHandle
Delete the source for the given handle. Does not remove the texture itself.
Handle to remove the source for
true
if a source was removed
Uninitialize any rendering resources associated with this handler. E.g., delete shaders.
Texture manager.
Load textures from different sources and get texture handles to use when rendering.
Remarks
This service keeps hold of all sources used to create textures. This allows restoring textures and contents after a context-loss (https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event).