Skip to content

bug: couldn't compile with ImGui 1.91.9 #319

@CosminPerRam

Description

@CosminPerRam

Upon using v3.0 and ImGui 1.91.9 I encounter these compilation errors:

D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-src\imgui-SFML.cpp(779,12): error C2661: 'ImGui::Image': no overloaded function takes 6 arguments [D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-build\ImGui-SFML.vcxproj]
  D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-src\imgui-SFML.cpp(779,12):
  while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, ImColor, ImColor)'

D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-src\imgui-SFML.cpp(792,12): error C2661: 'ImGui::Image': no overloaded function takes 6 arguments [D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-build\ImGui-SFML.vcxproj]
  D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-src\imgui-SFML.cpp(792,12):
  while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, ImColor, ImColor)'

D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-src\imgui-SFML.cpp(813,12): error C2661: 'ImGui::Image': no overloaded function takes 6 arguments [D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-build\ImGui-SFML.vcxproj]
  D:\GitHub\StylishVisualizer\build\_deps\imgui-sfml-src\imgui-SFML.cpp(813,12):
  while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, ImColor, ImColor)'

Code references (in order of error messages):

ImGui::Image(textureID, toImVec2(size), ImVec2(0, 0), ImVec2(1, 1), toImColor(tintColor), toImColor(borderColor));

imgui-sfml/imgui-SFML.cpp

Lines 792 to 800 in 070d6ab

ImGui::Image(textureID,
toImVec2(size),
ImVec2(0, 1),
ImVec2(1, 0), // flipped vertically,
// because textures in
// sf::RenderTexture are
// stored this way
toImColor(tintColor),
toImColor(borderColor));

ImGui::Image(textureID, toImVec2(size), uv0, uv1, toImColor(tintColor), toImColor(borderColor));

Which seems to be due to breakage of ImGui::Image API:

Image

Using a version prior to this one compiles with no problems.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions