mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-25 13:07:01 +00:00
Added imgui_single_file.h, We use this to validate compiling all *.cpp in same compilation unit.
Removed Unity builds stuff from example_null/. CI builds a temporary .cpp file.
This commit is contained in:
parent
97a8dc6514
commit
f03c00bc89
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
@ -44,8 +44,13 @@ jobs:
|
|||||||
- name: Build example_null (extra warnings)
|
- name: Build example_null (extra warnings)
|
||||||
run: mingw32-make -C examples/example_null EXTRA_WARNINGS=1
|
run: mingw32-make -C examples/example_null EXTRA_WARNINGS=1
|
||||||
|
|
||||||
- name: Build example_null (unity build)
|
- name: Build example_null (single file build)
|
||||||
run: mingw32-make -C examples/example_null UNITY_BUILD=1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
|
||||||
|
echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
|
||||||
|
echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
|
||||||
|
g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp
|
||||||
|
|
||||||
- name: Build Win32 example_glfw_opengl2
|
- name: Build Win32 example_glfw_opengl2
|
||||||
shell: cmd
|
shell: cmd
|
||||||
@ -176,8 +181,12 @@ jobs:
|
|||||||
make -C examples/example_null clean
|
make -C examples/example_null clean
|
||||||
CXXFLAGS="$CXXFLAGS -m64" CXX=clang++ make -C examples/example_null EXTRA_WARNINGS=1
|
CXXFLAGS="$CXXFLAGS -m64" CXX=clang++ make -C examples/example_null EXTRA_WARNINGS=1
|
||||||
|
|
||||||
- name: Build example_null (unity build)
|
- name: Build example_null (single file build)
|
||||||
run: make -C examples/example_null UNITY_BUILD=1
|
run: |
|
||||||
|
echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
|
||||||
|
echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
|
||||||
|
echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
|
||||||
|
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
|
||||||
|
|
||||||
- name: Build example_glfw_opengl2
|
- name: Build example_glfw_opengl2
|
||||||
run: make -C examples/example_glfw_opengl2
|
run: make -C examples/example_glfw_opengl2
|
||||||
@ -208,8 +217,12 @@ jobs:
|
|||||||
- name: Build example_null (extra warnings)
|
- name: Build example_null (extra warnings)
|
||||||
run: make -C examples/example_null EXTRA_WARNINGS=1
|
run: make -C examples/example_null EXTRA_WARNINGS=1
|
||||||
|
|
||||||
- name: Build example_null (unity build)
|
- name: Build example_null (single file build)
|
||||||
run: make -C examples/example_null UNITY_BUILD=1
|
run: |
|
||||||
|
echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
|
||||||
|
echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
|
||||||
|
echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
|
||||||
|
clang++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
|
||||||
|
|
||||||
- name: Build example_glfw_opengl2
|
- name: Build example_glfw_opengl2
|
||||||
run: make -C examples/example_glfw_opengl2
|
run: make -C examples/example_glfw_opengl2
|
||||||
|
@ -68,11 +68,14 @@ Other Changes:
|
|||||||
- ColorEdit: In HSV display of a RGB stored value, attempt to locally preserve Saturation
|
- ColorEdit: In HSV display of a RGB stored value, attempt to locally preserve Saturation
|
||||||
when Value==0.0 (similar to changes done in 1.73 for Hue). Removed Hue editing lock since
|
when Value==0.0 (similar to changes done in 1.73 for Hue). Removed Hue editing lock since
|
||||||
those improvements in 1.73 makes them unnecessary. (#2722, #2770). [@rokups]
|
those improvements in 1.73 makes them unnecessary. (#2722, #2770). [@rokups]
|
||||||
- Misc: Added ImGuiMouseCursor_NotAllowed enum so it can be used by more shared widgets. [@rokups]
|
|
||||||
- ImDrawList: Add AddNgon(), AddNgonFilled() API with a guarantee on the explicit segment count.
|
- ImDrawList: Add AddNgon(), AddNgonFilled() API with a guarantee on the explicit segment count.
|
||||||
In the current branch they are essentially the same as AddCircle(), AddCircleFilled() but as
|
In the current branch they are essentially the same as AddCircle(), AddCircleFilled() but as
|
||||||
we will rework the circle rendering functions to use textures and automatic segment count
|
we will rework the circle rendering functions to use textures and automatic segment count
|
||||||
selection, those new api can fill a gap. [@ShironekoBen]
|
selection, those new api can fill a gap. [@ShironekoBen]
|
||||||
|
- Misc: Added ImGuiMouseCursor_NotAllowed enum so it can be used by more shared widgets. [@rokups]
|
||||||
|
- Misc: Added misc/single_file/imgui_single_file.h, We use this to validate compiling all *.cpp
|
||||||
|
files in a same compilation unit. Actual users of that technique (also called "Unity builds")
|
||||||
|
can generally provide this themselves, so we don't really recommend you use this. [@rokups]
|
||||||
- Backends: GLFW, SDL, Win32, OSX, Allegro: Added support for ImGuiMouseCursor_NotAllowed. [@rokups]
|
- Backends: GLFW, SDL, Win32, OSX, Allegro: Added support for ImGuiMouseCursor_NotAllowed. [@rokups]
|
||||||
- Backends: GLFW: Added support for the missing mouse cursors newly added in GLFW 3.4+. [@rokups]
|
- Backends: GLFW: Added support for the missing mouse cursors newly added in GLFW 3.4+. [@rokups]
|
||||||
- Backends: SDL: Wayland: use SDL_GetMouseState (because there is no global mouse state available
|
- Backends: SDL: Wayland: use SDL_GetMouseState (because there is no global mouse state available
|
||||||
|
@ -5,13 +5,8 @@
|
|||||||
|
|
||||||
EXE = example_null
|
EXE = example_null
|
||||||
EXTRA_WARNINGS ?= 0
|
EXTRA_WARNINGS ?= 0
|
||||||
UNITY_BUILD ?= 0
|
SOURCES = main.cpp
|
||||||
ifeq ($(UNITY_BUILD), 1)
|
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
|
||||||
SOURCES = unity_build.cpp
|
|
||||||
else
|
|
||||||
SOURCES = main.cpp
|
|
||||||
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
|
|
||||||
endif
|
|
||||||
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
|
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
|
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
// Unity build test - build this example as a single compilation unit.
|
|
||||||
#include "main.cpp"
|
|
||||||
#include "../../imgui.cpp"
|
|
||||||
#include "../../imgui_demo.cpp"
|
|
||||||
#include "../../imgui_draw.cpp"
|
|
||||||
#include "../../imgui_widgets.cpp"
|
|
17
misc/single_file/imgui_single_file.h
Normal file
17
misc/single_file/imgui_single_file.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// imgui_single_file.h
|
||||||
|
// 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,
|
||||||
|
// so we don't really recommend you use this in your projects.
|
||||||
|
|
||||||
|
// Do this:
|
||||||
|
// #define IMGUI_IMPLEMENTATION
|
||||||
|
// Before you include this file 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.
|
||||||
|
#include "../../imgui.h"
|
||||||
|
|
||||||
|
#ifdef IMGUI_IMPLEMENTATION
|
||||||
|
#include "../../imgui.cpp"
|
||||||
|
#include "../../imgui_demo.cpp"
|
||||||
|
#include "../../imgui_draw.cpp"
|
||||||
|
#include "../../imgui_widgets.cpp"
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user