DVUI

textureRetain

Retain this texture key.

While retained dvui will not free its texture. To free it you must call either textureRelease or retainClear.

Only valid between Window.beginand Window.end.

Parameters

#
key:Texture.Cache.Key
Texture.Cache.Key

Source

Implementation

#
pub fn textureRetain(key: Texture.Cache.Key) void {
    currentWindow().texture_cache.retain(currentWindow().gpa, key, .zero) catch |err| {
        dvui.logError(@src(), err, "Could not retain texture with key {x}", .{key});
        return;
    };
}