Giter Club home page Giter Club logo

Comments (5)

Nic-Urb avatar Nic-Urb commented on September 23, 2024 1

I had to remove the defines IMGUI_DISABLE_OBSOLETE_KEYIO and IMGUI_DISABLE_OBSOLETE_FUNCTIONS from my project.

from imgui.

ocornut avatar ocornut commented on September 23, 2024

It should be the same, if it's different it could mean that:

  • your ImGuiIO pointer is invalid, but here it is valid as you got it from ImGui::GetIO() in same scope where ImGui::GetMousePos() works correctly.

or

  • the struct layout in current compilation unit is incorrect. Either it means the file wasn't rebuilt, either it means the structure layout from the point of view of your compilation unit, doesn't match the structure layout used by imgui. It could be the case if you used some #define affecting the layout of ImGuiIO. The only remaining #define which affects the struct layout are IMGUI_DISABLE_OBSOLETE_KEYIO and IMGUI_DISABLE_OBSOLETE_FUNCTIONS. If you use them they must in used in all compilation units or e.g. in your imconfig file. If they are mismatching between compilation units you have an issue.
  • our examples use a IMGUI_CHECKVERSION() macros which is used to compare struct layout sizes between your code and dear imgui and detect this sorts of mistake.

from imgui.

ocornut avatar ocornut commented on September 23, 2024

What was the issue then?

from imgui.

ocornut avatar ocornut commented on September 23, 2024

You can use them but they need to be defined the same for all compilation unit (imgui code and your code using imgui). The best place to put them is indeed in the imconfig file.

from imgui.

Nic-Urb avatar Nic-Urb commented on September 23, 2024

Okay, thanks for the help!

from imgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.