Click or drag to resize

TextureCache Methods

The TextureCache type exposes the following members.

Methods
  NameDescription
Public methodStatic memberContains
Determines whether a texture is registered under the given name.
Public methodStatic memberGetSize
Gets the pixel size of the texture registered under the given name.
Public methodStatic memberRemove
Removes the texture registered under the given name and frees its pixels.

Anything still pointing at the name falls back to looking for an image file called that, so remove a name only once nothing is drawing it.

Public methodStatic memberSet
Registers, or replaces the pixels of, the in-memory texture with the given name.

The bitmap's pixels are copied, so the caller stays free to keep painting into the same bitmap and call this again. Replacing the pixels of a name that is already in use invalidates the copy the display holds on the GPU, so the new pixels appear on the next redraw of any viewport that draws the texture.

Top
See Also