|
@@ -50,6 +50,7 @@ public:
|
50
|
50
|
cb->Commit();
|
51
|
51
|
|
52
|
52
|
DKLog("Texture created!");
|
|
53
|
+ return tex;
|
53
|
54
|
}
|
54
|
55
|
}
|
55
|
56
|
return nullptr;
|
|
@@ -101,9 +102,11 @@ public:
|
101
|
102
|
|
102
|
103
|
DKObject<DKGpuBuffer> vertexBuffer = device->CreateBuffer(vertexBufferSize, DKGpuBuffer::StorageModeShared, DKCpuCacheModeReadWrite);
|
103
|
104
|
memcpy(vertexBuffer->Contents(), vertexData, vertexBufferSize);
|
|
105
|
+ vertexBuffer->Flush();
|
104
|
106
|
|
105
|
107
|
DKObject<DKGpuBuffer> indexBuffer = device->CreateBuffer(indexBufferSize, DKGpuBuffer::StorageModeShared, DKCpuCacheModeReadWrite);
|
106
|
108
|
memcpy(indexBuffer->Contents(), indexData, indexBufferSize);
|
|
109
|
+ indexBuffer->Flush();
|
107
|
110
|
|
108
|
111
|
DKRenderPipelineDescriptor pipelineDescriptor;
|
109
|
112
|
pipelineDescriptor.vertexFunction = vertShaderFunction;
|
|
@@ -163,6 +166,7 @@ public:
|
163
|
166
|
|
164
|
167
|
memcpy(uboBuffer->Contents(), &ubo, sizeof(ubo));
|
165
|
168
|
bindSet->SetBuffer(0, uboBuffer, 0, sizeof(ubo));
|
|
169
|
+ uboBuffer->Flush();
|
166
|
170
|
}
|
167
|
171
|
}
|
168
|
172
|
|