https://github.com/rbourgeat/scop
Basic GPU rendering with Vulkan (MacOS/Linux)
https://github.com/rbourgeat/scop
42born2code 42cursus 42projects 42school cpp linux macos scope vulkan
Last synced: 10 months ago
JSON representation
Basic GPU rendering with Vulkan (MacOS/Linux)
- Host: GitHub
- URL: https://github.com/rbourgeat/scop
- Owner: rbourgeat
- Created: 2024-01-09T12:37:14.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T13:44:32.000Z (almost 2 years ago)
- Last Synced: 2025-03-20T09:21:21.436Z (11 months ago)
- Topics: 42born2code, 42cursus, 42projects, 42school, cpp, linux, macos, scope, vulkan
- Language: C++
- Homepage: https://rbourgeat.github.io/scop
- Size: 2.15 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# scop
Basic 3D model viewer made with Vulkan, C++ and GLFW.


## Pre-requisites
Install Vulkan from [source](https://vulkan.lunarg.com/).
Linux:
```bash
sudo apt-get install -y libglfw3 libglfw3-dev libxxf86vm-dev libxi-dev
# For debug:
sudo apt-get install -y libvulkan-dev vulkan-validationlayers
```
Macos:
```bash
brew install glfw
export DYLD_LIBRARY_PATH=/Users/$USER/VulkanSDK/$(ls -1 "/Users/$USER/VulkanSDK" | sort -V | tail -n 1)/macOS/lib/:$DYLD_LIBRARY_PATH
```
## Build
Normal:
- Using make
```bash
make
```
- Using cmake
```bash
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE= .. # use Debug to enable debug mode
# Use your generator (most likely, ninja or make)
# if make:
make
# if ninja:
ninja
```
Re-build:
```bash
make re
```
Build in debug mode:
```bash
make debug
```
## Run
```bash
./scop "path/to/file.obj"
```
## Inputs
- `MOUSE` : rotate 3D object
- `SPACE` : reset object position/rotation + camera
- `R, G, B, D, 0` : color in red, green, blue, dark or black (like the subject)
- `T` : change topology
- `1, 2, 3` : increase X, Y, Z model position
- `SHIFT` + `1, 2, 3` : decrease X, Y, Z model position
- `4, 5, 6` : increase X, Y, Z model rotation
- `SHIFT` + `4, 5, 6` : decrease X, Y, Z model rotation
- `M` : toggles usage of a texture with a little transition
- `N` : reset color
## Sources
- https://vulkan-tutorial.com
## ToDo List
- [ ] Add more material parameters
- [ ] Comput shader
- [ ] Refacto `VulkanApp.hpp`
- [ ] https://developer.nvidia.com/vulkan-memory-management