commit
This commit is contained in:
parent
dfe9b1abe9
commit
c82c8c0887
35 changed files with 245 additions and 10 deletions
34
examples/VulkanTriangle/README.md
Normal file
34
examples/VulkanTriangle/README.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# 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
|
||||
|
||||
[DescriptorSet](https://crafter-graphics.docs.catcrafts.net/classCrafter_1_1DescriptorSet.html)
|
||||
[Mesh](https://crafter-graphics.docs.catcrafts.net/classCrafter_1_1Mesh.html)
|
||||
[MeshShader](https://crafter-graphics.docs.catcrafts.net/classCrafter_1_1MeshShader.html)
|
||||
[VulkanShader](https://crafter-graphics.docs.catcrafts.net/classCrafter_1_1VulkanShader.html)
|
||||
[VulkanPipeline](https://crafter-graphics.docs.catcrafts.net/classCrafter_1_1VulkanPipeline.html)
|
||||
[WindowWaylandVulkan](https://crafter-graphics.docs.catcrafts.net/classCrafter_1_1WindowWaylandVulkan.html)
|
||||
Loading…
Add table
Add a link
Reference in a new issue