This repository contains ImGui+Vulkan examples implemented as CMake project.
The following libraries are included as git submodules in 3rdparty
folder:
The following dependencies are not included and must be present in CMake path:
Note that not all CMake versions are provided together with FindSDL2.cmake
module that is required for SDLVulkan
project.
One may check SDL2Config.cmake from official SDL repo
or a blog post by trenki2
or other sources and copy the file into <CMake shared dir>/Modules
.
The following instructions apply to:
- Ubuntu 24.04, 22.04, 20.04
sudo apt-get install \
build-essential \
cmake \
libvulkan-dev \
libsdl2-dev
The following instructions apply to:
- Fedora 22 and higher
sudo dnf install \
gcc gcc-c++ make \
cmake \
mesa-vulkan-devel \
libXrandr-devel \
libXinerama-devel \
libXcursor-devel \
libXi-devel \
SDL2-devel
Clone the repository together with submodules using --recursive
flag:
git clone --recursive https://github.com/Postrediori/VulkanImGui.git
The program is built with the commands below. CMake requires the directory
with the main project's CMakeLists.txt
file as an argument. Then the CMake
creates the build files for the GNU make which build an executable.
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make install
After the successful build binaries will end up in <source dir>/bundle
sub-folder:
cd <source dir>
# Run GLFW-based demo
./bundle/GLFWVulkan/GLFWVulkan
# Run SDL-based demo
./bundle/SDLVulkan/SDLVulkan