Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7a118ef
feat(gameclient) Introduce imgui console
jurassicLizard Jan 15, 2026
019af6d
Fix failing Release build with imgui enabled
jurassicLizard Jan 15, 2026
a7806a8
Move ImGui Render before DRAW call for consistency
jurassicLizard Jan 16, 2026
38407bf
Remove redundant Frame creation in dx8wrapper
jurassicLizard Jan 16, 2026
34d99c4
Fix configuration to also accept RTS_BUILD_OPTION_DEBUG
jurassicLizard Jan 16, 2026
9865b8d
Add feature info for ImGui build option
jurassicLizard Jan 16, 2026
821222b
Backport ImGui integration to generals
jurassicLizard Jan 16, 2026
f41c6d5
Cleanup redundant deadcode
jurassicLizard Jan 16, 2026
731da38
Add TheSuperHackers comments according to guidlines
jurassicLizard Jan 16, 2026
67a4645
Remove redundant Render
jurassicLizard Jan 16, 2026
8f9f434
Fix type in ImGui CMakeLists
jurassicLizard Jan 16, 2026
34e3752
Fix NullPointer dereference in imgui_impl_dx8
jurassicLizard Jan 16, 2026
dada1a4
fix missing result status check
jurassicLizard Jan 16, 2026
4361776
fix second potential nullptr dereference in dx8 backend
jurassicLizard Jan 16, 2026
473f9d7
Fix crash in worldbuilder and guiedit
jurassicLizard Jan 19, 2026
dd8541a
Fix further nullptr deref issues in ImGui dx8backend
jurassicLizard Jan 19, 2026
a23ab53
Fix indentation in ImGui CMakeLists.txt
jurassicLizard Jan 20, 2026
0b25693
Fix cmake option description for imgui
jurassicLizard Jan 20, 2026
86a0677
Change RTS_IMGUI_ENABLED to RTS_HAS_IMGUI
jurassicLizard Jan 20, 2026
34374cb
Remove excess lines
jurassicLizard Jan 20, 2026
3adbc7a
Update Error messsages in CMakeLists
jurassicLizard Jan 20, 2026
56c92d7
Change NULL to nullptr in dx8 backend
jurassicLizard Jan 20, 2026
d0db383
Remove and centralize description comments
jurassicLizard Jan 20, 2026
39de6fc
Revert "Change NULL to nullptr in dx8 backend"
jurassicLizard Jan 20, 2026
3f7f17e
Move lib_imgui linking away from corei_always
jurassicLizard Jan 20, 2026
cec768f
Restore nullptr fixes
jurassicLizard Jan 20, 2026
ebc7fad
Fix copyright header and space issues
jurassicLizard Jan 20, 2026
1558483
Fix style issues
jurassicLizard Jan 20, 2026
d288d6e
Fix ImGui dx8 style and copyright header
jurassicLizard Jan 20, 2026
d086853
unify cmake win dx8 imgui impl variables
jurassicLizard Jan 20, 2026
22b9274
remove redundant C-Style casting for ImGui Io
jurassicLizard Jan 20, 2026
ca0b995
Fix SuperHackers comment alignment and redundancy
jurassicLizard Jan 20, 2026
ff01f44
add dx9 imgui impl header to our own dx8 impl files
jurassicLizard Jan 20, 2026
e9a36e6
Create wrapper for ImGui Frame mgmt and integrate in WorldbuilderV
jurassicLizard Jan 20, 2026
94124e3
Finalize ImGui integration in Gen and ZH worldbuilders
jurassicLizard Jan 21, 2026
34a4dc6
Add copyright headers and fix indentation in frame mgr
jurassicLizard Jan 21, 2026
21171d1
Remove imgui integration naming
jurassicLizard Jan 22, 2026
32a61c4
link lib_imgui to g_gameengine and z_gameengine instead of _always
jurassicLizard Jan 26, 2026
17a3000
fix copyright header order
jurassicLizard Jan 26, 2026
a4957f7
fix more style issues in imgui dx8 backend
jurassicLizard Jan 26, 2026
e916ac7
remove excess spaces from ImGuiFrameManager
jurassicLizard Jan 26, 2026
eb43457
align class and namespace for ImGuiFrameManager
jurassicLizard Jan 26, 2026
abe01e0
remove unwanted comments
jurassicLizard Jan 26, 2026
f142bcd
move comments inside conditional compilation block in wbview3d
jurassicLizard Jan 26, 2026
2eeab3f
remove superfluous superhackers comment
jurassicLizard Jan 26, 2026
1a575df
partially fix regression that stopped imgui from rendering
jurassicLizard Jan 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ target_link_libraries(corei_always INTERFACE
corei_libraries_include
resources
)

target_link_libraries(corei_always_no_pch INTERFACE
core_config
core_utility_no_pch
Expand Down
5 changes: 5 additions & 0 deletions Core/Libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ add_subdirectory(Source/debug)
add_subdirectory(Source/EABrowserDispatch)
add_subdirectory(Source/EABrowserEngine)
add_subdirectory(Source/Compression)

# Imgui library
if (RTS_BUILD_OPTION_IMGUI)
add_subdirectory(Source/ImGui)
endif ()
62 changes: 62 additions & 0 deletions Core/Libraries/Source/ImGui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FetchContent_Declare(
imgui
GIT_REPOSITORY https://github.com/ocornut/imgui.git
GIT_TAG 791ad9b82db44ada9fedb3e26b2d900974ac0959
SYSTEM
)

FetchContent_MakeAvailable(imgui)

# Main IMGUI sources we are going to need
set(IMGUI_BASE_SRCS
"${imgui_SOURCE_DIR}/imgui.cpp"
"${imgui_SOURCE_DIR}/imgui_draw.cpp"
"${imgui_SOURCE_DIR}/imgui_tables.cpp"
"${imgui_SOURCE_DIR}/imgui_widgets.cpp"
"${imgui_SOURCE_DIR}/imgui_demo.cpp"
)

# Main Win32 DX8 specific sources we are going to need we can specify more if we need extra platforms
set(IMGUI_WIN32_DX8_ALL_SRCS
"${IMGUI_BASE_SRCS}"
"${imgui_SOURCE_DIR}/backends/imgui_impl_win32.cpp"
"${CMAKE_SOURCE_DIR}/Core/Libraries/Source/ImGui/dx8_backend/imgui_impl_dx8.cpp"
)

# All Include directories
set(IMGUI_INCLUDE_DIRS
"${imgui_SOURCE_DIR}"
"${imgui_SOURCE_DIR}/backends"
# DX8 override. Remove the following once we are using a standard backend
"${CMAKE_SOURCE_DIR}/Core/Libraries/Source/ImGui/dx8_backend"
)

# start target build section
# we currently have a hard dependency on dx8 and win32 api
if (WIN32)
# for now we only need it in debug configurations
if ( NOT ( (CMAKE_BUILD_TYPE STREQUAL "Debug") OR RTS_BUILD_OPTION_DEBUG ) )
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_BUILD_TYPE represents the Compiler Optimizations right? Why would Imgui need to be compiled out with Compiler Optimizations?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is ,probably, only the case with Visual Studio (CMAKE_BUILD_TYPE probably even ignored) , similarly --config Debug is ignored in Linux/Unix or Windows/MinGW but CMAKE_BUILD_TYPE is central for these it does not only engage compiler optimizations it also automatically sets the '-g' flag for debug symbols and activates the DEBUG or _DEBUG preprocessor defines and extra stuff like bounds checking and stack corruption checks. Especially people coming from non-windows OSes would find it confusing when Cmake Debug profile is activated but they do not find themselves able to debug runtime.(which happened to me when i first started contributing here).

Since ImGui is cross-platform it might make use of such conditional debugging mechanisms and assertions, so it doesn't hurt to compile with CMAKE_BUILD_TYPE as Debug on the contrary might even expose debug relevant assertions although i am not sure how ImGui works with Debug assertions

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we allow ImGui in all configurations? Simply have it guarded behind the ImGui Cmake option. It is simpler.

MESSAGE(FATAL_ERROR "ImGui is currently only available in Debug build modes")
endif ()

MESSAGE(STATUS "Enabling ImGui")

add_library(lib_imgui STATIC ${IMGUI_WIN32_DX8_ALL_SRCS}
"${CMAKE_CURRENT_LIST_DIR}/wrapper/ImGuiFrameManager.cpp"
)
target_include_directories(lib_imgui
PUBLIC ${IMGUI_INCLUDE_DIRS}
PUBLIC "${CMAKE_CURRENT_LIST_DIR}/wrapper")
target_link_libraries(lib_imgui PRIVATE d3d8lib)

# use our own imconfig.h
target_compile_definitions(lib_imgui
PRIVATE IMGUI_DISABLE_DEFAULT_IMCONFIG
PRIVATE IMGUI_USER_CONFIG="${CMAKE_CURRENT_LIST_DIR}/imconfig.h"
INTERFACE RTS_HAS_IMGUI
)
else ()
# currently only WIN32 DX is supported
MESSAGE(FATAL_ERROR "Non-Windows platforms currently not supported for ImGui")
endif ()
# end target build section
Loading
Loading