This is a mirror for our own archival, of a starter template for #bgfx #imgui using #cmake
#gamedev #template #starter #cpp
|
%!s(int64=4) %!d(string=hai) anos | |
---|---|---|
3rdparty | %!s(int64=4) %!d(string=hai) anos | |
src | %!s(int64=4) %!d(string=hai) anos | |
.gitignore | %!s(int64=4) %!d(string=hai) anos | |
.gitmodules | %!s(int64=4) %!d(string=hai) anos | |
CMakeLists.txt | %!s(int64=4) %!d(string=hai) anos | |
LICENSE.txt | %!s(int64=4) %!d(string=hai) anos | |
README.md | %!s(int64=4) %!d(string=hai) anos |
This is a boilerplate for starting a project with bgfx and dear-imgui using cmake build system generator.
> git clone https://github.com/mnesarco/bgfx-with-imgui-example-cmake
> cd bgfx-with-imgui-example-cmake
> git submodule update --init --recursive
>
> mkdir build
> cd build
> cmake ..
> cmake --build .
This is the layout I am using in an internal project, I have published this here because it can be useful for someone else, but I do not plan to maintain this activelly. Anyway there is nothing novelty here, so it can be easilly adapted.
My main goal with this layout was to keep untouched versions of bgfx and imgui, everything in a nice cmake structure.
3rdparty/dear-imgui
, that version will not be used by this project.examples/common
dir, so I copied them locally. I do not use the files from bgfx directly because these files are just examples so they may need modifications.imgui_bgfx_extra.cpp
to maintain small adjustments depending on the selected imgui branch.imgui_bgfx_extra.cpp