This project focuses on developing a high-performance 3D renderer using the Vulkan API, leveraging its advanced features for optimal graphics rendering and resource management.
Before building the Vulkan Renderer, ensure you have the following dependencies installed:
- CMake (version 3.27 or higher)
- Vulkan SDK (latest version recommended)
- Git (for cloning the repository)
- Clone the Repository
First, clone the repository to your local machine:
git clone https://github.com/SharkFinPro/VulkanRenderer.git
cd VulkanRenderer
- Create a Build Directory
Create a separate directory for the build process:
mkdir build
cd build
- Generate Build Files with CMake
Configure the CMake project and generate the necessary build files:
cmake ..
- Build the Project
Compile the project using your preferred build system:
cmake --build .
- Run the Executable
After building, all files will have been written to the bin
directory. You can run the cube example with:
cd bin
./Cube
You can integrate the VulkanEngine library into your project using CMake's FetchContent module. This approach streamlines the process of fetching, building, and linking external dependencies.
Add the following lines to your CMakeLists.txt
to fetch and link the VulkanEngine library:
include(FetchContent)
# Declare VulkanEngine as a dependency
FetchContent_Declare(
VulkanEngine
GIT_REPOSITORY https://github.com/SharkFinPro/VulkanRenderer.git
GIT_TAG main
)
# Make VulkanEngine available to your project
FetchContent_MakeAvailable(VulkanEngine)
# Link VulkanEngine to your target
target_link_libraries(${PROJECT_NAME} PRIVATE VulkanEngine)
# Include VulkanEngine headers
target_include_directories(${PROJECT_NAME} PRIVATE ${VulkanEngine_SOURCE_DIR}/include)