Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit 2b19033

Browse files
committed
Fixed all issues with the tutorial after following it again
1 parent 7070396 commit 2b19033

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

docs/01_Installing_dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This page will explain how to install all the necessary tools to compile the Dax
66

77
### Visual Studio
88

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
9+
In this tutorial, ~~we will be using Clang as our compiler~~ (EDIT: For now, there are some issues with Clang on Windows, so we'll just use the Visual Studio compiler for now). 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
1010

1111
### Clang & Ninja
1212

docs/03_Getting_started/00_Creating_a_window.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using namespace daxa::types;
2525
#define GLFW_EXPOSE_NATIVE_WIN32
2626
#define GLFW_NATIVE_INCLUDE_NONE
2727
using HWND = void *;
28-
#elif defined(__linux__)/
28+
#elif defined(__linux__)
2929
#define GLFW_EXPOSE_NATIVE_X11
3030
#define GLFW_EXPOSE_NATIVE_WAYLAND
3131
#endif

docs/03_Getting_started/07_Task_graph.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Description
22

3-
While not entirely necessary, we're going to use TaskGraph, which allows us to compile a list of GPU tasks and their dependencies into a synchronized set of commands. This simplifies your code by making different tasks completely self-contained, while also generating the most optimal synchronization for the tasks you describe.
3+
While not entirely necessary, we're going to use TaskGraph, which allows us to compile a list of GPU tasks and their dependencies into a synchronized set of commands. This simplifies your code by making different tasks completely self-contained, while also generating the most optimal synchronization for the tasks you describe. To use TaskGraph, as its also an optional feature, add the include path `<daxa/utils/task_graph.hpp>` at the top of our main file.
44

55
## Creating a vertex uploading task
66

@@ -19,7 +19,7 @@ void upload_vertex_data_task(daxa::TaskGraph & tg, daxa::TaskBufferView vertices
1919
},
2020
.task = [=](daxa::TaskInterface ti)
2121
{
22-
// ...
22+
// [...]
2323
},
2424
});
2525
}
@@ -148,16 +148,10 @@ loop_task_graph.use_persistent_buffer(task_vertex_buffer);
148148
loop_task_graph.use_persistent_image(task_swapchain_image);
149149
```
150150

151-
Since we need the task graph to do something, we add a task that draws to the screen:
151+
Since we need the task graph to do something, we add the task that draws to the screen:
152152

153153
```cpp
154-
loop_task_graph.add_task(DrawToSwapchainTask{
155-
.uses = {
156-
.vertex_buffer = task_vertex_buffer.view(),
157-
.color_target = task_swapchain_image.view(),
158-
},
159-
.pipeline = pipeline.get(),
160-
});
154+
draw_vertices_task(loop_task_graph, pipeline, task_vertex_buffer, task_swapchain_image);
161155
```
162156
163157
Once we have added all the tasks we want, we have to tell the task graph we are done.

docs/03_Getting_started/08_Shader.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ layout(location = 0) out daxa_f32vec4 color;
3737
void main()
3838
{
3939
color = daxa_f32vec4(v_col, 1);
40+
41+
// Debug printf is not necessary, we just use it here to show how it can be used.
42+
// To be able to see the debug printf output, you need to open Vulkan Configurator and enable it there.
4043
debugPrintfEXT("test\n");
4144
}
4245

docs/03_Getting_started/09_Finishing_up.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,19 @@ struct MyPushConstant
374374
```cpp
375375
// src/shaders/main.glsl
376376
377+
// Includes the daxa shader API
377378
#include <daxa/daxa.inl>
379+
380+
// Enabled the extension GL_EXT_debug_printf
381+
#extension GL_EXT_debug_printf : enable
382+
383+
// Includes our shared types we created earlier
378384
#include <shared.inl>
379385
386+
// Enabled the push constant MyPushConstant we specified in shared.inl
380387
DAXA_DECL_PUSH_CONSTANT(MyPushConstant, push)
381388
389+
// We can define the vertex & fragment shader in one single file
382390
#if DAXA_SHADER_STAGE == DAXA_SHADER_STAGE_VERTEX
383391
384392
layout(location = 0) out daxa_f32vec3 v_col;
@@ -396,6 +404,9 @@ layout(location = 0) out daxa_f32vec4 color;
396404
void main()
397405
{
398406
color = daxa_f32vec4(v_col, 1);
407+
408+
// Debug printf is not necessary, we just use it here to show how it can be used.
409+
// To be able to see the debug printf output, you need to open Vulkan Configurator and enable it there.
399410
debugPrintfEXT("test\n");
400411
}
401412

0 commit comments

Comments
 (0)