documentation
This commit is contained in:
parent
cb500f5eda
commit
3275eb2f70
135 changed files with 15649 additions and 430 deletions
29
example/VulkanTriangle/README
Normal file
29
example/VulkanTriangle/README
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# HelloWindow Example
|
||||
|
||||
## Description
|
||||
|
||||
This example demonstrates how to load shaders and render a triangle.
|
||||
|
||||
## Expected Result
|
||||
|
||||
A blue tinted vulkan window with a white triangle in the center.
|
||||
|
||||
## Highlighted Code Snippet
|
||||
|
||||
```cpp
|
||||
EventListener<VkCommandBuffer> listener(&window.onDraw, [&descriptors, &meshShader](VkCommandBuffer cmd){
|
||||
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, Pipeline::pipelineLayout, 0, 2, &descriptors.set[0], 0, NULL);
|
||||
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, Pipeline::pipeline);
|
||||
VulkanDevice::vkCmdDrawMeshTasksEXTProc(cmd, meshShader.threadCount, 1, 1);
|
||||
});
|
||||
```
|
||||
|
||||
## How to Run
|
||||
|
||||
```bash
|
||||
crafter-build -c example -r
|
||||
```
|
||||
|
||||
## Relevant documentation
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue