Skip to content

Commit

Permalink
[Examples] Fixed loading Logo_OpenGL.png in MultiRenderer example.
Browse files Browse the repository at this point in the history
This bug was introduced when GL backend started returning different names from RenderSystem::GetName(),
namely "OpenGL Core" and "OpenGL Compatibility".

TODO: There should be a way to retrieve the module name as well.
  • Loading branch information
LukasBanana committed Nov 2, 2024
1 parent 707e144 commit e2849a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/Cpp/MultiRenderer/Example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ MyRenderer::MyRenderer(
static std::string GetRendererModuleName(std::string rendererName)
{
// Remove white spaces from name
return std::regex_replace(rendererName, std::regex("\\s+"), "");
std::string name = std::regex_replace(rendererName, std::regex("\\s+"), "");
return (name.compare(0, 6, "OpenGL") == 0 ? "OpenGL" : name);
}

void MyRenderer::CreateResources(const LLGL::ArrayView<TexturedVertex>& vertices, const LLGL::ArrayView<std::uint32_t>& indices)
Expand Down

0 comments on commit e2849a6

Please sign in to comment.