MCPcopy Create free account
hub / github.com/crosire/reshade / on_create_texture

Function on_create_texture

examples/08-texture_replace/texture_replace_addon.cpp:42–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42static bool on_create_texture(device *device, resource_desc &desc, subresource_data *initial_data, resource_usage)
43{
44 if (!filter_texture(device, desc, nullptr))
45 return false;
46
47 return initial_data != nullptr && load_texture_image(desc, *initial_data, s_data_to_delete);
48}
49static void on_after_create_texture(device *, const resource_desc &, const subresource_data *, resource_usage, resource)
50{
51 // Free the memory allocated via the 'load_texture_image' call above during the preceding 'create_resource' event that called in the 'on_create_texture' callback

Callers

nothing calls this directly

Calls 2

load_texture_imageFunction · 0.85
filter_textureFunction · 0.70

Tested by

no test coverage detected