void MarkUsed( int requiredMipSize )

book_4_sparkGenerated
code_blocksInput

Description

The MarkUsed method is a member of the Texture class in the Sandbox API. This method is used to mark a texture as being used, which can help optimize texture management by ensuring that the texture is not prematurely discarded or unloaded. The method takes an integer parameter, requiredMipSize, which specifies the minimum mipmap level that should be retained for the texture.

Usage

To use the MarkUsed method, you need to have an instance of a Texture object. Call the method on this instance and pass the desired mipmap level as an argument. This will ensure that the texture is marked as used and the specified mipmap level is retained.

Example

// Assuming 'texture' is an instance of Sandbox.Texture
int requiredMipSize = 2;
texture.MarkUsed(requiredMipSize);