Static variables
Static methods
Constructor
Variables
depthBuffer:DepthBuffer
When the texture is used as render target, tells which depth buffer will be used. If set to null, depth testing is disabled.
realloc:() ‑> Void
If this callback is set, the texture can be re-allocated when the 3D context has been lost or when it's been free because of lack of memory.
Methods
capturePixels(face:Int = 0, mipLevel:Int = 0, ?region:IBounds):Pixels
Downloads the current texture data from the GPU. Beware, this is a very slow operation that shouldn't be done during rendering.
preventAutoDispose():Void
In case of out of GPU memory, textures that hasn't been used for a long time will be disposed. Calling this will make this texture not considered for auto disposal.
swapTexture(t:Texture):Void
Swap two textures, this is an immediate operation. BEWARE : if the texture is a cached image (hxd.res.Image), the swap will affect the cache!
waitLoad(f:() ‑> Void):Void
Some textures might take some time to load. You can check flags.has(Loading) or add a waitLoad callback which will get called either immediately if the texture is already loaded or when loading is complete.