|
@@ -62,11 +62,11 @@ public:
|
62
|
62
|
pipelineDescriptor.colorAttachments.Value(0).pixelFormat = swapChain->ColorPixelFormat();
|
63
|
63
|
pipelineDescriptor.rasterizationEnabled = true;
|
64
|
64
|
pipelineDescriptor.vertexDescriptor.attributes = {
|
65
|
|
- { DKVertexFormat::Float4, 0, 0, 0 },
|
66
|
|
- { DKVertexFormat::Float4, sizeof(DKVector3), 0, 1 },
|
|
65
|
+ { DKVertexFormat::Float3, 0, 0, 0 },
|
|
66
|
+ { DKVertexFormat::Float3, sizeof(DKVector3), 0, 1 },
|
67
|
67
|
};
|
68
|
68
|
pipelineDescriptor.vertexDescriptor.layouts = {
|
69
|
|
- { DKVertexStepRate::Vertex, 0, 0 },
|
|
69
|
+ { DKVertexStepRate::Vertex, sizeof(Vertex), 0 },
|
70
|
70
|
};
|
71
|
71
|
|
72
|
72
|
DKObject<DKRenderPipelineState> pipelineState = device->CreateRenderPipeline(pipelineDescriptor, NULL);
|
|
@@ -87,16 +87,13 @@ public:
|
87
|
87
|
if (encoder)
|
88
|
88
|
{
|
89
|
89
|
// draw scene!
|
90
|
|
-
|
91
|
90
|
encoder->EndEncoding();
|
92
|
91
|
buffer->Commit();
|
93
|
|
- //buffer->WaitUntilCompleted();
|
94
|
92
|
swapChain->Present();
|
95
|
93
|
}
|
96
|
94
|
else
|
97
|
95
|
{
|
98
|
96
|
}
|
99
|
|
-
|
100
|
97
|
DKThread::Sleep(0.01);
|
101
|
98
|
}
|
102
|
99
|
DKLog("RenderThread terminating...");
|