mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
Comments/fixes about using IMGUI_DEFINE_MATH_OPERATORS in imconfig.h (#9524)
This commit is contained in:
parent
0af8f475d1
commit
1e51b6ffdc
@ -114,8 +114,11 @@
|
|||||||
constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \
|
constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \
|
||||||
operator MyVec4() const { return MyVec4(x,y,z,w); }
|
operator MyVec4() const { return MyVec4(x,y,z,w); }
|
||||||
*/
|
*/
|
||||||
//---- ...Or use Dear ImGui's own very basic math operators.
|
//---- ...Or use Dear ImGui's own basic math operators in every file including imgui.h:
|
||||||
|
//#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||||
//#define IMGUI_DEFINE_MATH_OPERATORS
|
//#define IMGUI_DEFINE_MATH_OPERATORS
|
||||||
|
//#endif
|
||||||
|
//---- ...Or manually '#define IMGUI_DEFINE_MATH_OPERATORS' before '#include "imgui.h"' to use from one file.
|
||||||
|
|
||||||
//---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
|
//---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
|
||||||
// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
|
// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
// dear imgui: single-file wrapper include
|
// dear imgui: single-file wrapper include
|
||||||
// We use this to validate compiling all *.cpp files in a same compilation unit.
|
// We use this to validate compiling all *.cpp files in a same compilation unit.
|
||||||
// Users of that technique (also called "Unity builds") can generally provide this themselves,
|
// Users of that technique (also called "Unity builds") can generally provide this themselves easily.
|
||||||
// so we don't really recommend you use this in your projects.
|
|
||||||
|
|
||||||
// Do this:
|
// Do this:
|
||||||
// #define IMGUI_IMPLEMENTATION
|
// #define IMGUI_IMPLEMENTATION
|
||||||
// Before you include this file in *one* C++ file to create the implementation.
|
// #include "imgui_single_file.h"
|
||||||
|
// In *one* C++ file to create the implementation.
|
||||||
// Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit.
|
// Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit.
|
||||||
|
|
||||||
#ifdef IMGUI_IMPLEMENTATION
|
#if defined(IMGUI_IMPLEMENTATION) && !defined(IMGUI_DEFINE_MATH_OPERATORS)
|
||||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user