forked from electronicarts/CnC_Generals_Zero_Hour
-
Notifications
You must be signed in to change notification settings - Fork 151
feat(gameclient): Introduce imgui framework #2127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jurassicLizard
wants to merge
53
commits into
TheSuperHackers:main
Choose a base branch
from
jurassicLizard:feature/imgui_console_integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
a6b3e21
feat(gameclient) Introduce imgui console
jurassicLizard fbb5b41
Fix failing Release build with imgui enabled
jurassicLizard 723a818
Move ImGui Render before DRAW call for consistency
jurassicLizard bb5b0b8
Remove redundant Frame creation in dx8wrapper
jurassicLizard fdd99b0
Fix configuration to also accept RTS_BUILD_OPTION_DEBUG
jurassicLizard 8b7d906
Add feature info for ImGui build option
jurassicLizard 0baa0b7
Backport ImGui integration to generals
jurassicLizard 1fc3ef5
Cleanup redundant deadcode
jurassicLizard 9d7e571
Add TheSuperHackers comments according to guidlines
jurassicLizard 3d91be9
Remove redundant Render
jurassicLizard f8b1e74
Fix type in ImGui CMakeLists
jurassicLizard 5edeb4f
Fix NullPointer dereference in imgui_impl_dx8
jurassicLizard 2ddf162
fix missing result status check
jurassicLizard 8b4dede
fix second potential nullptr dereference in dx8 backend
jurassicLizard a62f923
Fix crash in worldbuilder and guiedit
jurassicLizard ccc8397
Fix further nullptr deref issues in ImGui dx8backend
jurassicLizard 969eaee
Fix indentation in ImGui CMakeLists.txt
jurassicLizard 93e0ac7
Fix cmake option description for imgui
jurassicLizard 85f8c8a
Change RTS_IMGUI_ENABLED to RTS_HAS_IMGUI
jurassicLizard 4e83737
Remove excess lines
jurassicLizard 2b26d77
Update Error messsages in CMakeLists
jurassicLizard 8c87126
Change NULL to nullptr in dx8 backend
jurassicLizard 1dea931
Remove and centralize description comments
jurassicLizard 8f2dd3b
Revert "Change NULL to nullptr in dx8 backend"
jurassicLizard 6cb1cce
Move lib_imgui linking away from corei_always
jurassicLizard 2f400bc
Restore nullptr fixes
jurassicLizard 86450c2
Fix copyright header and space issues
jurassicLizard 359a704
Fix style issues
jurassicLizard c7237bc
Fix ImGui dx8 style and copyright header
jurassicLizard cb5d1fd
unify cmake win dx8 imgui impl variables
jurassicLizard 5ead1e5
remove redundant C-Style casting for ImGui Io
jurassicLizard 3e3fac8
Fix SuperHackers comment alignment and redundancy
jurassicLizard 38ce933
add dx9 imgui impl header to our own dx8 impl files
jurassicLizard e473a09
Create wrapper for ImGui Frame mgmt and integrate in WorldbuilderV
jurassicLizard 3e61510
Finalize ImGui integration in Gen and ZH worldbuilders
jurassicLizard ea6264a
Add copyright headers and fix indentation in frame mgr
jurassicLizard c406ff7
Remove imgui integration naming
jurassicLizard 9680c78
link lib_imgui to g_gameengine and z_gameengine instead of _always
jurassicLizard 0dde400
fix copyright header order
jurassicLizard d3fee46
fix more style issues in imgui dx8 backend
jurassicLizard d89458e
remove excess spaces from ImGuiFrameManager
jurassicLizard 72ae8e7
align class and namespace for ImGuiFrameManager
jurassicLizard 88d0ea5
remove unwanted comments
jurassicLizard ba687b7
move comments inside conditional compilation block in wbview3d
jurassicLizard 30c0b2a
remove superfluous superhackers comment
jurassicLizard 0cc678b
partially fix regression that stopped imgui from rendering
jurassicLizard fb220b9
fix worldbuilder regression with imgui not showing
jurassicLizard 7c00995
Apply Microsoft Codestyle and Allman Bracestyle to imgui codebase
jurassicLizard 54af2b1
Fix minor style and functional issues
jurassicLizard eb5f3f1
remove conditional build on Debug only modes
jurassicLizard 992acc7
fix various style issues
jurassicLizard 4c4cd79
modify handling of frame management in ZH
jurassicLizard 823901b
simplify frame management and apply changes to GeneralsV
jurassicLizard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,57 @@ | ||
| 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) | ||
| 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) | ||
jurassicLizard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # 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 () | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.