|
|
|
|
86
|
DKObject<DKRenderCommandEncoder> encoder = buffer->CreateRenderCommandEncoder(rpd);
|
86
|
DKObject<DKRenderCommandEncoder> encoder = buffer->CreateRenderCommandEncoder(rpd);
|
87
|
if (encoder)
|
87
|
if (encoder)
|
88
|
{
|
88
|
{
|
|
|
89
|
+ encoder->SetRenderPipelineState(pipelineState);
|
|
|
90
|
+ encoder->SetVertexBuffer(vertexBuffer, 0, 0);
|
|
|
91
|
+ encoder->SetIndexBuffer(indexBuffer, 0, DKIndexType::UInt32);
|
89
|
// draw scene!
|
92
|
// draw scene!
|
|
|
93
|
+ encoder->DrawIndexed(indexData.Count(), 1, 0, 0, 0);
|
90
|
encoder->EndEncoding();
|
94
|
encoder->EndEncoding();
|
91
|
buffer->Commit();
|
95
|
buffer->Commit();
|
92
|
swapChain->Present();
|
96
|
swapChain->Present();
|