|
|
|
|
67
|
|
67
|
|
68
|
// create texture
|
68
|
// create texture
|
69
|
DKObject<DKTexture> texture = LoadTexture2D(queue, resourcePool.LoadResourceData("textures/deathstar3.png"));
|
69
|
DKObject<DKTexture> texture = LoadTexture2D(queue, resourcePool.LoadResourceData("textures/deathstar3.png"));
|
|
|
70
|
+ // create sampler
|
|
|
71
|
+ DKSamplerDescriptor samplerDesc = {};
|
|
|
72
|
+ DKObject<DKSamplerState> sampler = device->CreateSamplerState(samplerDesc);
|
70
|
|
73
|
|
|
|
74
|
+ // create shaders
|
71
|
DKObject<DKShaderModule> vertShaderModule = device->CreateShaderModule(&vertShader);
|
75
|
DKObject<DKShaderModule> vertShaderModule = device->CreateShaderModule(&vertShader);
|
72
|
DKObject<DKShaderModule> fragShaderModule = device->CreateShaderModule(&fragShader);
|
76
|
DKObject<DKShaderModule> fragShaderModule = device->CreateShaderModule(&fragShader);
|
73
|
|
77
|
|