Skip to content

Commit 529fa12

Browse files
committed
cleanup
1 parent bcedcbe commit 529fa12

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/window/gui/Gui.cpp

-35
Original file line numberDiff line numberDiff line change
@@ -240,28 +240,6 @@ void Gui::LoadTextureFromRawImage(const std::string& name, const std::string& pa
240240
initData->Type = static_cast<uint32_t>(RESOURCE_TYPE_GUI_TEXTURE);
241241
initData->ResourceVersion = 0;
242242
auto guiTexture = std::static_pointer_cast<GuiTexture>(Context::GetInstance()->GetResourceManager()->LoadResource(path, false, initData));
243-
// const auto res = Context::GetInstance()->GetResourceManager()->GetArchiveManager()->LoadFile(path, initData);
244-
245-
// if (!res) {
246-
// SPDLOG_ERROR("Failed to load resource");
247-
// return;
248-
// }
249-
// if (!res->Buffer || res->Buffer->empty()) {
250-
// SPDLOG_ERROR("Buffer is null or empty");
251-
// return;
252-
// }
253-
254-
// GuiTexture asset;
255-
// asset.Width = 0;
256-
// asset.Height = 0;
257-
// uint8_t* imgData = stbi_load_from_memory(reinterpret_cast<const stbi_uc*>(res->Buffer->data()), res->Buffer->size(),
258-
// &asset.Width, &asset.Height, nullptr, 4);
259-
260-
261-
// if (imgData == nullptr) {
262-
// SPDLOG_ERROR("Error loading imgui texture {}", stbi_failure_reason());
263-
// return;
264-
// }
265243

266244
GfxRenderingAPI* api = gfx_get_current_rendering_api();
267245

@@ -272,19 +250,6 @@ void Gui::LoadTextureFromRawImage(const std::string& name, const std::string& pa
272250
api->upload_texture(guiTexture->Data, guiTexture->Metadata.Width, guiTexture->Metadata.Height);
273251

274252
mGuiTextures[name] = guiTexture->Metadata;
275-
// stbi_image_free(imgData);
276-
277-
// auto initData = std::make_shared<ResourceInitData>();
278-
// initData->Format = RESOURCE_FORMAT_BINARY;
279-
// initData->Type = static_cast<uint32_t>(RESOURCE_TYPE_GUI_TEXTURE);
280-
// initData->ResourceVersion = 0;
281-
// auto guiTextureResource = std::static_pointer_cast<GuiTextureResource>(Context::GetInstance()->GetResourceManager()->LoadResource(path, false, initData));
282-
283-
// if (guiTextureResource == nullptr) {
284-
// return;
285-
// }
286-
287-
// mGuiTextures[name] = guiTextureResource->GuiTextureData;
288253
}
289254

290255
bool Gui::SupportsViewports() {

0 commit comments

Comments
 (0)