Update triangle example to use the task graph#2794
Conversation
|
I kept the previous comments where applicable, but haven't added any new ones. So this still needs another pass in terms of documentation. But other than comments, this one is ready for review. |
9fe1c6d to
5374642
Compare
| struct TriangleTask { | ||
| pipeline: Option<Arc<GraphicsPipeline>>, | ||
| vertex_buffer_id: Id<Buffer>, | ||
| swapchain_id: Id<Swapchain>, |
There was a problem hiding this comment.
I first tried to use target: Id<Image> here instead of directly referring to the swapchain. This seemed cleaner, since the triangle task technically doesn't need to know that the target is a swapchain.
But didn't get it to work after some trial and error. Not sure if this is possible atm.
There was a problem hiding this comment.
<Id<Swapchain>>::current_image_id just casts the type parameter if you look at the implementation. This is but one of the reasons that the type parameter doesn't make sense.
|
Do you think rgb(251, 113, 133) looks the best for the trongle? 🤔 |
|
First thing that jumps out is that the |
Updates the
triangleexample to use the task graph.The changes follow the
deferredexample. Colors were adjusted, as discussed on Discord.