Skip to content

Instantly share code, notes, and snippets.

@tomaka
Created January 21, 2017 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaka/1ab9e17792324e48c124a5b74bf178a0 to your computer and use it in GitHub Desktop.
Save tomaka/1ab9e17792324e48c124a5b74bf178a0 to your computer and use it in GitHub Desktop.
unsafe impl<'a, Cb, V, Pv, Pl, Prp, S, Pc, O, O1, O2, O3, O4, O5> AddCommand<CmdDraw<V, Pv, Pl, Prp, S, Pc>> for Cb
where Pl: PipelineLayoutRef,
S: DescriptorSetsCollection,
Cb: AddCommand<CmdBindVertexBuffers<V>, Out = O1>,
O1: AddCommand<CmdPushConstants<Pc, Arc<GraphicsPipeline<Pv, Pl, Prp>>>, Out = O2>,
O2: AddCommand<CmdBindDescriptorSets<S, Arc<GraphicsPipeline<Pv, Pl, Prp>>>, Out = O3>,
O3: AddCommand<CmdSetState, Out = O4>,
O4: AddCommand<CmdBindPipeline<Arc<GraphicsPipeline<Pv, Pl, Prp>>>, Out = O5>,
O5: AddCommand<CmdDrawRaw, Out = O>
{
type Out = O;
#[inline]
fn add(self, command: CmdDraw<V, Pv, Pl, Prp, S, Pc>) -> O {
self.add(command.vertex_buffers)
.add(command.push_constants)
.add(command.descriptor_sets)
.add(command.set_state)
.add(command.bind_pipeline)
.add(command.draw_raw)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment