textureRetainToken
Set retain token for this texture key. null means remove retain token.
While a texture key has retain dvui will not free its texture. To free it
you must call either this with null, or retainClear.
Only valid between Window.beginand Window.end.
Parameters
- key:Texture.Cache.Key
- Texture.Cache.Key
- retain_token:?data.Token
- ?data.Token
Source
Implementation
pub fn textureRetainToken(key: Texture.Cache.Key, retain_token: ?data.Token) void {
currentWindow().texture_cache.retain(currentWindow().gpa, key, retain_token) catch |err| {
dvui.logError(@src(), err, "Could not retain texture with key {x}", .{key});
return;
};
}