|
| 1 | +diff --git a/imconfig.h b/imconfig.h |
| 2 | +index e09dff0..9ebe738 100644 |
| 3 | +--- a/imconfig.h |
| 4 | ++++ b/imconfig.h |
| 5 | +@@ -14,6 +14,8 @@ |
| 6 | + |
| 7 | + #pragma once |
| 8 | + |
| 9 | ++#include <glm/glm.hpp> |
| 10 | ++ |
| 11 | + //---- Define assertion handler. Defaults to calling assert(). |
| 12 | + // If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement. |
| 13 | + //#define IM_ASSERT(_EXPR) MyAssert(_EXPR) |
| 14 | +@@ -27,8 +29,8 @@ |
| 15 | + //#define IMGUI_API __declspec( dllimport ) |
| 16 | + |
| 17 | + //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names. |
| 18 | +-//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS |
| 19 | +-//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87+ disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This is automatically done by IMGUI_DISABLE_OBSOLETE_FUNCTIONS. |
| 20 | ++#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS |
| 21 | ++#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87+ disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This is automatically done by IMGUI_DISABLE_OBSOLETE_FUNCTIONS. |
| 22 | + |
| 23 | + //---- Disable all of Dear ImGui or don't implement standard windows/tools. |
| 24 | + // It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp. |
| 25 | +@@ -74,7 +76,7 @@ |
| 26 | + //---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui) |
| 27 | + // Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided). |
| 28 | + // On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'. |
| 29 | +-//#define IMGUI_ENABLE_FREETYPE |
| 30 | ++#define IMGUI_ENABLE_FREETYPE |
| 31 | + |
| 32 | + //---- Use FreeType+lunasvg library to render OpenType SVG fonts (SVGinOT) |
| 33 | + // Requires lunasvg headers to be available in the include path + program to be linked with the lunasvg library (not provided). |
| 34 | +@@ -88,15 +90,15 @@ |
| 35 | + |
| 36 | + //---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4. |
| 37 | + // This will be inlined as part of ImVec2 and ImVec4 class declarations. |
| 38 | +-/* |
| 39 | +-#define IM_VEC2_CLASS_EXTRA \ |
| 40 | +- constexpr ImVec2(const MyVec2& f) : x(f.x), y(f.y) {} \ |
| 41 | +- operator MyVec2() const { return MyVec2(x,y); } |
| 42 | + |
| 43 | +-#define IM_VEC4_CLASS_EXTRA \ |
| 44 | +- constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \ |
| 45 | +- operator MyVec4() const { return MyVec4(x,y,z,w); } |
| 46 | +-*/ |
| 47 | ++#define IM_VEC2_CLASS_EXTRA \ |
| 48 | ++ constexpr ImVec2(const glm::vec2& f) : x(f.x), y(f.y) {} \ |
| 49 | ++ operator glm::vec2() const { return glm::vec2(x,y); } |
| 50 | ++ |
| 51 | ++#define IM_VEC4_CLASS_EXTRA \ |
| 52 | ++ constexpr ImVec4(const glm::vec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \ |
| 53 | ++ operator glm::vec4() const { return glm::vec4(x,y,z,w); } |
| 54 | ++ |
| 55 | + //---- ...Or use Dear ImGui's own very basic math operators. |
| 56 | + //#define IMGUI_DEFINE_MATH_OPERATORS |
| 57 | + |
0 commit comments