Skip to content

Commit ddbf72f

Browse files
committed
Texture hotfix release
1 parent 3e3d595 commit ddbf72f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Framework/Renderer/Utils/Texture.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ void UImGui::Texture::init(UImGui::String file) noexcept
2424
dt.channels = 0;
2525

2626
dt.data = nullptr;
27+
dt.customSaveFunction = [](TextureData*, String) -> bool { return false; };
2728
}
2829

2930
void UImGui::Texture::load(void* data, uint32_t x, uint32_t y, uint32_t depth, bool bFreeImageData, const std::function<void(void*)>& freeFunc) noexcept
3031
{
3132
if (data == nullptr || (x == 0 && y == 0))
3233
{
33-
data = stbi_load(dt.filename, (int*)&x, (int*)&y, nullptr, 0);
34+
data = stbi_load(dt.filename, (int*)&x, (int*)&y, &dt.channels, 0);
3435
if (data == nullptr)
3536
{
3637
Logger::log("Failed to load a texture with the following location: ", UVK_LOG_TYPE_ERROR, dt.filename);

0 commit comments

Comments
 (0)