|
|
|
|
20
|
{
|
20
|
{
|
21
|
DKObject<DKData> vertData = resourcePool.LoadResourceData("triangle.vert.spv");
|
21
|
DKObject<DKData> vertData = resourcePool.LoadResourceData("triangle.vert.spv");
|
22
|
DKObject<DKData> fragData = resourcePool.LoadResourceData("triangle.frag.spv");
|
22
|
DKObject<DKData> fragData = resourcePool.LoadResourceData("triangle.frag.spv");
|
23
|
- DKShader vertShader(vertData, DKShader::StageType::Vertex);
|
|
|
24
|
- DKShader fragShader(fragData, DKShader::StageType::Fragment);
|
|
|
|
|
23
|
+ DKShader vertShader(vertData, DKShader::Vertex);
|
|
|
24
|
+ DKShader fragShader(fragData, DKShader::Fragment);
|
25
|
|
25
|
|
26
|
DKObject<DKGraphicsDevice> device = DKGraphicsDevice::SharedInstance();
|
26
|
DKObject<DKGraphicsDevice> device = DKGraphicsDevice::SharedInstance();
|
27
|
DKObject<DKShaderModule> vertShaderModule = device->CreateShaderModule(&vertShader);
|
27
|
DKObject<DKShaderModule> vertShaderModule = device->CreateShaderModule(&vertShader);
|
|
|
|
|
30
|
DKObject<DKShaderFunction> vertShaderFunction = vertShaderModule->CreateFunction(vertShaderModule->FunctionNames().Value(0));
|
30
|
DKObject<DKShaderFunction> vertShaderFunction = vertShaderModule->CreateFunction(vertShaderModule->FunctionNames().Value(0));
|
31
|
DKObject<DKShaderFunction> fragShaderFunction = fragShaderModule->CreateFunction(fragShaderModule->FunctionNames().Value(0));
|
31
|
DKObject<DKShaderFunction> fragShaderFunction = fragShaderModule->CreateFunction(fragShaderModule->FunctionNames().Value(0));
|
32
|
|
32
|
|
33
|
- DKObject<DKCommandQueue> queue = device->CreateCommandQueue();
|
|
|
|
|
33
|
+ DKObject<DKCommandQueue> queue = device->CreateCommandQueue(DKCommandQueue::Graphics);
|
34
|
DKObject<DKSwapChain> swapChain = queue->CreateSwapChain(window);
|
34
|
DKObject<DKSwapChain> swapChain = queue->CreateSwapChain(window);
|
35
|
|
35
|
|
36
|
|
36
|
|