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.
On Ubuntu or Debian:
apt install \
build-essential \
cmake \
libvulkan-dev \
libsdl2-dev \
libxkbcommon-dev
Additional dependency for building under Wayland:
apt install libwayland-dev
On RedHat-based, Fedora systems:
dnf install \
gcc gcc-c++ make \
cmake \
vulkan-loader-devel \
libXrandr-devel \
libXinerama-devel \
libXcursor-devel \
libXi-devel \
libxkbcommon-devel \
SDL2-devel
Additional dependency for building under Wayland:
dnf install wayland-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