impr: Added support for SVG loading, improved texture loading API

This commit is contained in:
WerWolv
2024-05-01 20:36:10 +02:00
parent ef99e9d6f8
commit 1df0eea6c6
26 changed files with 881 additions and 84 deletions

View File

@@ -783,7 +783,7 @@ namespace hex::plugin::visualizers {
vertexArray.bind();
if (s_shouldUpdateTexture) {
s_shouldUpdateTexture = false;
s_modelTexture = ImGuiExt::Texture(s_texturePath, ImGuiExt::Texture::Filter::Nearest);
s_modelTexture = ImGuiExt::Texture::fromImage(s_texturePath, ImGuiExt::Texture::Filter::Nearest);
}
if (s_drawTexture)
@@ -899,7 +899,7 @@ namespace hex::plugin::visualizers {
vertexArray.unbind();
frameBuffer.unbind();
s_texture = ImGuiExt::Texture(renderTexture.release(), GLsizei(renderTexture.getWidth()), GLsizei(renderTexture.getHeight()));
s_texture = ImGuiExt::Texture::fromGLTexture(renderTexture.release(), GLsizei(renderTexture.getWidth()), GLsizei(renderTexture.getHeight()));
drawWindow(s_texture, s_renderingWindowSize, mvp);
}