Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/benjaminyde/arcticengine

Vulkan Game Engine Using Linux Dev Container
https://github.com/benjaminyde/arcticengine

3d clang cmake container cplusplus cpp devcontainer docker dockerfile game glw graphics linux rendering sdk sdl vscode vulkan vulkan-api

Last synced: about 3 hours ago
JSON representation

Vulkan Game Engine Using Linux Dev Container

Awesome Lists containing this project

README

        

# ArcticEngine

Development Environment:

- Linux, Ubuntu 22.04
- LLVM Clang 19.1.2
- CMake 3.30.5
- C++ 23
- VS Code using Dev Containers (Docker)

Libraries used:

- [Vulkan](https://www.lunarg.com/vulkan-sdk/): a new generation graphics and compute API that provides high-efficiency, cross-platform access to modern graphics processing units (GPUs), `1.3.290.0`
- [SDL](https://github.com/libsdl-org/SDL): Simple Directmedia Layer (low level access to audio, keyboard, mouse, joystick, and graphics hardware), `2.30.8`
- [GLM](https://github.com/g-truc/glm): OpenGL Mathematics (GLM), `1.0.1`
- [FMT](https://github.com/fmtlib/fmt): A modern formatting library, `10.2.1`
- [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator): Easy to integrate Vulkan memory allocation library, `3.1.0`

# CMake Graph Visualizer

Use `graphviz` to visualize the dependency graph:

1. Navigate to your build directory
1. Run CMake with the --graphviz option
- This will generate a graph.dot file in your build directory
1. Use dot (included in graphviz) to generate an image from the .dot file:
- This will generate a graph.png image file in your build directory.

```sh
cd /path/to/your/build
cmake --graphviz=graph.dot .
dot -Tpng graph.dot -o graph.png
```
# Vulkan Test

To verify that vulkan works correctly,
run the following command:

```sh
vulkaninfo
```

and

```sh
vkvia
```

# Renderdoc

1. Open the terminal
1. Enter the following command to open renderdoc:
```bash
qrenderdoc
```
1. Inside the app, a warning should tell you that vulkan needs to be configured for renderdoc
Click on that warning, that enables you to generate the config. Make sure to generate in the user and not root.

# Build Shaders

`glslc` is a command-line tool that is part of the Shaderc project. It's essentially a compiler that transforms GLSL (OpenGL Shading Language) source code into SPIR-V binary format.

To use glsc, execute the following command format:

```bash
glslc -o
```

For example:

```bash
glslc shader.vert -o vert.spv
glslc.exe shader.frag -o frag.spv
```

In these examples, `shader.vert` is the vertex shader and `shader.frag` is the fragment shader. The `-o` option specifies the output file, which will be in SPIR-V format.

Afterward, you can load these `.spv` files in your Vulkan application and create shader modules from them, which can then be used in the graphics pipeline.