Skip to content

dmcg310/vertex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vertex

Vertex is a Vulkan-based renderer.

vertex.png

Features

  • Vulkan initialization and setup
  • GPU memory management using VulkanMemoryAllocator (VMA)
  • Shader compilation (vertex and fragment shaders)
  • Multithreaded, native, OBJ model loading.
  • Imgui integration
  • File and console-based logging
  • Profiling with Spall

Prerequisites

To build and run this project, you need:

Ensure that both Odin and Vulkan SDK are properly installed and their paths are set in your system's environment variables.

Project Structure

├── src\    # Odin source files
├── scripts\    # Build and compile scripts
│   ├── build.py
│   ├── compile.bat
│   └── compile.sh
├── assets\
│   ├── shaders\    # GLSL shader files
│   ├── models\    # .obj model files
│   └── textures\    # Texture files
├── bin\    # Output directory for compiled binary
└── external\    # External dependencies
    ├── odin-imgui\    # ImGui bindings for Odin (submodule)
    └── odin-vma\    # VulkanMemoryAllocator bindings for Odin (submodule)

Building and Running

  1. Clone the repository with submodules:
git clone --recursive https://github.com/dmcg310/vertex.git

If you have already cloned without --recursive, you can initialize submodules with:

git submodule update --init --recursive
  1. Install the required Python package:
pip install colorama ply
  1. Build ImGui (required at least once):
python3 scripts/build.py --rebuild-imgui --debug

Or

python3 scripts/build.py --rebuild-imgui --release
  1. For subsequent builds, run the build script without the ImGui flag:
python3 scripts/build.py --debug

Or

python3 scripts/build.py --release
  1. Optionally, run the build script with the profile flag to enable profiling:
python3 scripts/build.py --debug --profile

Or

python3 scripts/build.py --release --profile

Note: this will output trace_vertex.spall into bin/. This can be viewed by opening spall-web, then opening the file in the icon at the top left.

This script will initialize submodules, compile the shaders, build the Odin project in the specified mode (debug or release), and run the resulting binary.

References

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Vulkan-based renderer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages