Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which version of imgui do you base on ? #49

Closed
Corezcy opened this issue Mar 2, 2021 · 5 comments
Closed

Which version of imgui do you base on ? #49

Corezcy opened this issue Mar 2, 2021 · 5 comments

Comments

@Corezcy
Copy link

Corezcy commented Mar 2, 2021

Describe the bug
My imgui version is 1.73. My project is organised by google's bazel.When compiling the project, the error occurs

third_party/ImGuiFileDialog/ImGuiFileDialog.cpp: In member function 'bool IGFD::FileDialog::Display(const string&, ImGuiWindowFlags, ImVec2, ImVec2)':
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1009:56: error: 'struct ImGuiWindow' has no member named 'ContentRegionRect'; did you mean 'ContentsRegionRect'?
     m_DialogCenterPos = ImGui::GetCurrentWindowRead()->ContentRegionRect.GetCenter();
                                                        ^~~~~~~~~~~~~~~~~
                                                        ContentsRegionRect
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp: In member function 'virtual void IGFD::FileDialog::DrawPathComposer()':
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1273:31: error: 'ImGuiMouseButton_Right' was not declared in this scope
      if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
                               ^~~~~~~~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1273:31: note: suggested alternative: 'ImGuiMouseCursor_Count_'
      if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
                               ^~~~~~~~~~~~~~~~~~~~~~
                               ImGuiMouseCursor_Count_
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp: In member function 'virtual void IGFD::FileDialog::DrawFileListView(ImVec2)':
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1312:10: error: 'ImGuiTableFlags' does not name a type; did you mean 'ImGuiTabItemFlags'?
   static ImGuiTableFlags flags = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_RowBg |
          ^~~~~~~~~~~~~~~
          ImGuiTabItemFlags
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1319:14: error: 'BeginTable' is not a member of 'ImGui'
   if (ImGui::BeginTable("##fileTable", 4, flags, vSize))
              ^~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1319:14: note: suggested alternative: 'BeginTabItem'
   if (ImGui::BeginTable("##fileTable", 4, flags, vSize))
              ^~~~~~~~~~
              BeginTabItem
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1319:43: error: 'flags' was not declared in this scope
   if (ImGui::BeginTable("##fileTable", 4, flags, vSize))
                                           ^~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1319:43: note: suggested alternative: 'llabs'
   if (ImGui::BeginTable("##fileTable", 4, flags, vSize))
                                           ^~~~~
                                           llabs
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1321:11: error: 'TableSetupScrollFreeze' is not a member of 'ImGui'
    ImGui::TableSetupScrollFreeze(0, 1); // Make header always visible
           ^~~~~~~~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1321:11: note: suggested alternative: 'SetScrollHere'
    ImGui::TableSetupScrollFreeze(0, 1); // Make header always visible
           ^~~~~~~~~~~~~~~~~~~~~~
           SetScrollHere
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1322:11: error: 'TableSetupColumn' is not a member of 'ImGui'
    ImGui::TableSetupColumn(m_HeaderFileName.c_str(), ImGuiTableColumnFlags_WidthStretch, -1, 0);
           ^~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1322:11: note: suggested alternative: 'NextColumn'
    ImGui::TableSetupColumn(m_HeaderFileName.c_str(), ImGuiTableColumnFlags_WidthStretch, -1, 0);
           ^~~~~~~~~~~~~~~~
           NextColumn
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1322:54: error: 'ImGuiTableColumnFlags_WidthStretch' was not declared in this scope
    ImGui::TableSetupColumn(m_HeaderFileName.c_str(), ImGuiTableColumnFlags_WidthStretch, -1, 0);
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1322:54: note: suggested alternative: 'ImGuiTabItemFlags_SetSelected'
    ImGui::TableSetupColumn(m_HeaderFileName.c_str(), ImGuiTableColumnFlags_WidthStretch, -1, 0);
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                      ImGuiTabItemFlags_SetSelected
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1323:11: error: 'TableSetupColumn' is not a member of 'ImGui'
    ImGui::TableSetupColumn(m_HeaderFileType.c_str(), ImGuiTableColumnFlags_WidthFixed, -1, 1);
           ^~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1323:11: note: suggested alternative: 'NextColumn'
    ImGui::TableSetupColumn(m_HeaderFileType.c_str(), ImGuiTableColumnFlags_WidthFixed, -1, 1);
           ^~~~~~~~~~~~~~~~
           NextColumn
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1323:54: error: 'ImGuiTableColumnFlags_WidthFixed' was not declared in this scope
    ImGui::TableSetupColumn(m_HeaderFileType.c_str(), ImGuiTableColumnFlags_WidthFixed, -1, 1);
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1323:54: note: suggested alternative: 'ImGuiColumnsFlags_NoResize'
    ImGui::TableSetupColumn(m_HeaderFileType.c_str(), ImGuiTableColumnFlags_WidthFixed, -1, 1);
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                      ImGuiColumnsFlags_NoResize
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1324:11: error: 'TableSetupColumn' is not a member of 'ImGui'
    ImGui::TableSetupColumn(m_HeaderFileSize.c_str(), ImGuiTableColumnFlags_WidthFixed, -1, 2);
           ^~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1324:11: note: suggested alternative: 'NextColumn'
    ImGui::TableSetupColumn(m_HeaderFileSize.c_str(), ImGuiTableColumnFlags_WidthFixed, -1, 2);
           ^~~~~~~~~~~~~~~~
           NextColumn
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1325:11: error: 'TableSetupColumn' is not a member of 'ImGui'
    ImGui::TableSetupColumn(m_HeaderFileDate.c_str(), ImGuiTableColumnFlags_WidthFixed, -1, 3);
           ^~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1325:11: note: suggested alternative: 'NextColumn'
    ImGui::TableSetupColumn(m_HeaderFileDate.c_str(), ImGuiTableColumnFlags_WidthFixed, -1, 3);
           ^~~~~~~~~~~~~~~~
           NextColumn
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1329:8: error: 'ImGuiTableSortSpecs' was not declared in this scope
    if (ImGuiTableSortSpecs* sorts_specs = ImGui::TableGetSortSpecs())
        ^~~~~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1329:8: note: suggested alternative: 'ImGuiTabItem'
    if (ImGuiTableSortSpecs* sorts_specs = ImGui::TableGetSortSpecs())
        ^~~~~~~~~~~~~~~~~~~
        ImGuiTabItem
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1329:29: error: 'sorts_specs' was not declared in this scope
    if (ImGuiTableSortSpecs* sorts_specs = ImGui::TableGetSortSpecs())
                             ^~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1329:50: error: 'TableGetSortSpecs' is not a member of 'ImGui'
    if (ImGuiTableSortSpecs* sorts_specs = ImGui::TableGetSortSpecs())
                                                  ^~~~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1346:11: error: 'TableHeadersRow' is not a member of 'ImGui'
    ImGui::TableHeadersRow();
           ^~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1398:14: error: 'TableNextRow' is not a member of 'ImGui'
       ImGui::TableNextRow();
              ^~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1402:18: error: 'TableNextColumn' is not a member of 'ImGui'
       if (ImGui::TableNextColumn()) // file name
                  ^~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1402:18: note: suggested alternative: 'NextColumn'
       if (ImGui::TableNextColumn()) // file name
                  ^~~~~~~~~~~~~~~
                  NextColumn
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1406:18: error: 'TableNextColumn' is not a member of 'ImGui'
       if (ImGui::TableNextColumn()) // file type
                  ^~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1406:18: note: suggested alternative: 'NextColumn'
       if (ImGui::TableNextColumn()) // file type
                  ^~~~~~~~~~~~~~~
                  NextColumn
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1410:18: error: 'TableNextColumn' is not a member of 'ImGui'
       if (ImGui::TableNextColumn()) // file size
                  ^~~~~~~~~~~~~~~
third_party/ImGuiFileDialog/ImGuiFileDialog.cpp:1410:18: note: suggested alternative: 'NextColumn'
       if (ImGui::TableNextColumn()) // file size
                  ^~~~~~~~~~~~~~~
                  NextColumn

I think it's caused by the difference with imgui version .
Thank you !

ps.here's my cc_library of ImGuiFileDialog

load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_library(
    name = "ImGuiFileDialog",
    srcs = [
        "GL/gl3w.c",
        "ImGuiFileDialog.cpp",
    ],
    hdrs = [
        "GL/gl3w.h",
        "GL/glcorearb.h",
        "ImGuiFileDialog.h",
        "ImGuiFileDialogConfig.h",
    ],
    includes = [
        ".",
        "GL/",
    ],
    linkopts = [
        "-ldl",
        "-lm",
        "-lGL",
        "-lGLU",
        "-lX11",
        "-lXi",
        "-lXrandr",
        "-lXxf86vm",
        "-lXinerama",
        "-lXcursor",
    ],
    deps = [
        "//third_party/imgui",
    ],
)

Desktop (please complete the following information):
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"

@aiekick
Copy link
Owner

aiekick commented Mar 2, 2021

i follow the last imgui release. so at each release i update the code.
the last imgui release was ImGui 1.81 :)

@Corezcy
Copy link
Author

Corezcy commented Mar 2, 2021

When I try to update my imgui version and introduce your lib, something wrong with my gl3w. issue: ocornut/imgui#3860 (comment).
Could you please tell me do you have gl3w or glew problem and how do you solve this problem?

@Corezcy Corezcy closed this as completed Mar 2, 2021
@aiekick
Copy link
Owner

aiekick commented Mar 2, 2021

im using glad. btw i had some issues by the past with gl3w. dont know why precisely

@Corezcy
Copy link
Author

Corezcy commented Mar 2, 2021

im using glad. btw i had some issues by the past with gl3w. dont know why precisely

I solve this problem by changing the position between glew and gl3w.
https://github.com/ocornut/imgui/blob/cdf1926f21d17a3d9be7f69434cc18dc65dd6609/backends/imgui_impl_opengl3.h#L67
https://github.com/ocornut/imgui/blob/cdf1926f21d17a3d9be7f69434cc18dc65dd6609/backends/imgui_impl_opengl3.h#L82

@aiekick
Copy link
Owner

aiekick commented Mar 2, 2021

its not logic, but ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants