Click or drag to resize

TextureCacheSet Method

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.

Namespace:  Rhino.Display
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public static bool Set(
	string name,
	Bitmap bitmap
)

Parameters

name
Type: SystemString
The name to register the pixels under. Any string will do as long as it is used consistently; prefixing it with something specific to your tool avoids colliding with another plug-in, or with a real image file path. Comparison is case-insensitive and treats forward and back slashes as equivalent, the same as texture file paths.
bitmap
Type: System.DrawingBitmap
The pixels to use.

Return Value

Type: Boolean
true on success.
See Also