-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* cmake: Add cimgui and glad dependencies * pcmockup: Add imgui WindowContainer * pcmockup: Add imgui ImageWindow * pcmockup: Migrate PebbleWindow to imgui * pcmockup: Migrate debugWindow to imgui * pcmockup: add initial menubar * pcmockup: Improve ImageWindow content alignment * pcmockup: add extra include for travis * pcmockup: work around missing header guard * cmake: Update cimgui and ignore warnings * PCMockup: Add Window module * pcmockup: Migrate ImageWindow and consumers to Window * pcmockup: Readd debug dragging * pcmockup: Readd debug zooming * pcmockup: fix slight misalignment * pcmockup: fix logical merge conflict * pcmockup: replace dragging with key controls because imgui really does not like other people knowing what it does * pcmockup: reintroduce dragging with MMB * pcmockup: tweaks
- Loading branch information
Showing
19 changed files
with
918 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
[submodule "external/stb"] | ||
path = external/stb | ||
url = https://github.com/nothings/stb.git | ||
[submodule "external/cimgui"] | ||
path = external/cimgui | ||
url = https://github.com/cimgui/cimgui.git | ||
[submodule "external/glad"] | ||
path = external/glad | ||
url = https://github.com/Dav1dde/glad.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Configures cimgui for use in PebbleOfDoom | ||
|
||
set(CIMGUI_DIR "${CMAKE_SOURCE_DIR}/external/cimgui/") | ||
set(IMGUI_DIR "${CIMGUI_DIR}/imgui/") | ||
if (NOT EXISTS "${CIMGUI_DIR}/cimgui.h") | ||
message(FATAL_ERROR "Could not find cimgui, did you clone the submodules?") | ||
endif() | ||
if (NOT EXISTS "${IMGUI_DIR}/imgui.h") | ||
message(FATAL_ERROR "Could not find imgui, did you clone the submodules *recursively*?") | ||
endif() | ||
|
||
set(sources_cimgui | ||
${CIMGUI_DIR}/cimgui.h | ||
${CIMGUI_DIR}/cimgui.cpp | ||
|
||
${IMGUI_DIR}/imgui.h | ||
${IMGUI_DIR}/imgui.cpp | ||
${IMGUI_DIR}/imgui_draw.cpp | ||
${IMGUI_DIR}/imgui_demo.cpp | ||
${IMGUI_DIR}/imgui_widgets.cpp | ||
|
||
${IMGUI_DIR}/examples/imgui_impl_sdl.h | ||
${IMGUI_DIR}/examples/imgui_impl_sdl.cpp | ||
${IMGUI_DIR}/examples/imgui_impl_opengl3.h | ||
${IMGUI_DIR}/examples/imgui_impl_opengl3.cpp | ||
) | ||
|
||
add_library(cimgui ${sources_cimgui}) | ||
target_include_directories(cimgui | ||
PRIVATE ${IMGUI_DIR} | ||
PRIVATE ${SDL2_INCLUDE_DIR} | ||
INTERFACE ${CIMGUI_DIR} | ||
INTERFACE ${IMGUI_DIR}/examples | ||
) | ||
target_link_libraries(cimgui | ||
PUBLIC ${SDL2_LIBRARY} | ||
PUBLIC glad | ||
) | ||
target_compile_definitions(cimgui | ||
PRIVATE "-DIMGUI_IMPL_API=extern \"C\"" | ||
PRIVATE IMGUI_IMPL_OPENGL_LOADER_GLAD | ||
INTERFACE CIMGUI_DEFINE_ENUMS_AND_STRUCTS | ||
) | ||
target_compile_options(cimgui PRIVATE | ||
"-Wno-pragma-pack" | ||
"-Wno-return-type-c-linkage" | ||
"-Wno-unused-const-variable" | ||
"-Wno-macro-redefined" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Configures glad for use in PebbleOfDoom | ||
|
||
set(GLAD_DIR "${CMAKE_SOURCE_DIR}/external/glad") | ||
if (NOT EXISTS "${GLAD_DIR}/CMakeLists.txt") | ||
message(FATAL_ERROR "Could not find glad, did you clone the submodules?") | ||
endif() | ||
|
||
set(GLAD_PROFILE "core" CACHE STRING "" FORCE) | ||
set(GLAD_API "gl=3.0" CACHE STRING "" FORCE) | ||
set(GLAD_GENERATOR "c" CACHE STRING "" FORCE) | ||
set(GLAD_EXTENSIONS "" CACHE STRING "" FORCE) | ||
set(GLAD_SPEC "gl" CACHE STRING "" FORCE) | ||
option(GLAD_NO_LOADER "" ON) | ||
add_subdirectory(${GLAD_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef CIMGUI_INCLUDE_H | ||
#define CIMGUI_INCLUDE_H | ||
|
||
#pragma GCC diagnostic push | ||
#ifdef __clang__ | ||
#pragma GCC diagnostic ignored "-Wpragma-pack" | ||
#pragma GCC diagnostic ignored "-Wmacro-redefined" | ||
#endif | ||
#include<cimgui.h> | ||
#pragma GCC diagnostic pop | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.