You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/01_Installing_dependencies.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This page will explain how to install all the necessary tools to compile the Dax
6
6
7
7
### Visual Studio
8
8
9
-
In this tutorial, we will be using Clang as our compiler. Clang relies on the Microsoft STL, which we can get most easily by installing [Visual Studio](https://visualstudio.microsoft.com/de/vs/community/) and selecting the C++ desktop development component during installation
9
+
In this tutorial, ~~we will be using Clang as our compiler~~ (EDIT: For now, there are some issues with Clang on Windows, so ). Clang relies on the Microsoft STL, which we can get most easily by installing [Visual Studio](https://visualstudio.microsoft.com/de/vs/community/) and selecting the C++ desktop development component during installation
Copy file name to clipboardExpand all lines: docs/03_Getting_started/00_Creating_a_window.md
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,20 @@ The first thing when developing a graphics application is to open a blank window
4
4
5
5
## Creating a header file
6
6
7
-
In this tutorial, we will create a new header file `window.hpp` that is responsible for interfacing and abstracting the windowing library of our choice GLFW.
7
+
In this tutorial, we will create a new header file `src/window.hpp` that is responsible for interfacing and abstracting the windowing library of our choice GLFW.
8
8
9
9
```cpp
10
10
#pragma once
11
11
12
-
structWindow{
12
+
structAppWindow{
13
13
};
14
14
```
15
15
16
16
Next, we need to include the libraries. Since we need the native window handle later, we also need the native GLFW headers. Since those libraries are platform dependant though, we need some extra preprocessor magic.
17
17
18
18
```cpp
19
19
#include<daxa/daxa.hpp>
20
+
// For things like `u32`. Not necessary of course.
Copy file name to clipboardExpand all lines: docs/03_Getting_started/02_Choosing_a_device.md
+3-18Lines changed: 3 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,25 +2,10 @@
2
2
3
3
A PC can have multiple graphics cards. Unlike OpenGL, you need to manually select which GPU you want to use to perform calculations. Since each GPU is different Daxa provides a simple system to select the GPU best suited for your application. You can choose the considered parameters yourself and change how they are weighed against each other.
4
4
5
-
Below is a sample code to select a GPU based on location & VRAM.
5
+
Below is sample code that selects the first device provided by the Vulkan driver (so long as it supports all of Daxa's required features). This means that if the user sets a device override in an application such as NVIDIA control panel, said device will be selected.
The struct daxa::DeviceProperties has many fields indicating different GPU attributes, such as Vulkan version, device type, ray tracing capabilities, ... ([Code reference](https://github.com/Ipotrick/Daxa/blob/master/include/daxa/device.hpp#L188))
11
+
Usually, this is the desired behavior. If you want more control over device selection, see how this is done in [The device creation sample in the Daxa repository](https://github.com/Ipotrick/Daxa/blob/master/tests/2_daxa_api/2_device/main.cpp)
In the sample code, the native window handle can be obtained by the `Window#get_native_handle` and `Window#get_native_platform`
32
+
In the sample code, the native window handle can be obtained by 2 of the helper-functions we created `AppWindow::get_native_handle()` and `AppWindow::get_native_platform()`
33
33
34
34
### daxa::PresentMode
35
35
36
-
This defines how the rendered images are supplied to your screen. `daxa::PresentMode::MAILBOX` is the recommended default option for most use cases.
36
+
This defines how the rendered images are supplied to your screen. `daxa::PresentMode::FIFO` is the recommended default option for most use cases.
37
37
38
38
| mode | meaning |
39
39
| --- | --- |
40
40
| daxa::PresentMode::IMMEDIATE | Images submitted by your application are transferred to the screen right away, which may result in tearing |
41
41
| daxa::PresentMode::FIFO | The swapchain is a queue where the display takes an image from the front of the queue when the display is refreshed and the program inserts rendered images at the back of the queue. If the queue is full then the program has to wait. This is most similar to vertical sync as found in modern games. The moment that the display is refreshed is known as "vertical blank". |
42
42
| daxa::PresentMode::FIFO_RELAXED | This mode only differs from the previous one if the application is late and the queue was empty at the last vertical blank. Instead of waiting for the next vertical blank, the image is transferred right away when it finally arrives. This may result in visible tearing. |
43
-
| daxa::PresentMode::MAILBOX | This is another variation of the second mode. Instead of blocking the application when the queue is full, the images that are already queued are simply replaced with the newer ones. This mode can be used to render frames as fast as possible while still avoiding tearing, resulting in fewer latency issues than standard vertical sync. This is commonly known as "triple buffering", although the existence of three buffers alone does not necessarily mean that the framerate is unlocked. |
44
-
45
-
### daxa::Format
46
-
47
-
This defines the color space for the swapchain images. (`R8G8B8A8_UINT` is the default 256-bit RGBA color space most displays use).
43
+
| daxa::PresentMode::MAILBOX | This is another variation of the second mode. Instead of blocking the application when the queue is full, the images that are already queued are simply replaced with the newer ones. This mode can be used to render frames as fast as possible while still avoiding tearing, resulting in fewer latency issues than standard vertical sync. This is commonly known as "triple buffering", although the existence of three buffers alone does not necessarily mean that the framerate is unlocked. Although this may be desirable, it has limited support on AMD devices |
48
44
49
45
## Swapchain usage
50
46
@@ -61,59 +57,19 @@ If all swapchain images are used in queued submissions to the GPU, the present c
To use push constants in our demo project, we need to create a new file: `shader/shared.inl` which will be a shared file between our main program and our shader file. Since Glsl is more or less a superset of basic C, we can use some code snippets in both languages.
8
+
To use push constants in our demo project, we need to create a new file: `src/shader/shared.inl` which will be a shared file between our main program and our shader file. Since Glsl is more or less a superset of basic C, we can use some code snippets in both languages.
9
9
10
10
Since this document is treated as a header file in our C++ code, we can simply insert `#pragma once` at the top to make sure it's only included once. We also need to include the Daxa (Shader) API directly beneath it: `#include <daxa/daxa.inl>`.
0 commit comments