|
@@ -340,7 +340,7 @@ public:
|
340
|
340
|
DKMatrix4 viewMatrix;
|
341
|
341
|
} ubo;
|
342
|
342
|
|
343
|
|
- DKObject<DKGpuBuffer> uboBuffer = device->CreateBuffer(sizeof(ubo), DKGpuBuffer::StorageModePrivate, DKCpuCacheModeDefault);
|
|
343
|
+ DKObject<DKGpuBuffer> uboBuffer = device->CreateBuffer(sizeof(ubo), DKGpuBuffer::StorageModeShared, DKCpuCacheModeDefault);
|
344
|
344
|
if (uboBuffer)
|
345
|
345
|
{
|
346
|
346
|
ubo.projectionMatrix = DKMatrix4::identity;
|
|
@@ -350,10 +350,10 @@ public:
|
350
|
350
|
void* p = uboBuffer->Lock(0);
|
351
|
351
|
if (p)
|
352
|
352
|
{
|
353
|
|
- memcpy(uboBuffer->Lock(0), &ubo, sizeof(ubo));
|
|
353
|
+ memcpy(p, &ubo, sizeof(ubo));
|
354
|
354
|
uboBuffer->Unlock();
|
355
|
355
|
|
356
|
|
- bindSet->SetBuffer(0, uboBuffer);
|
|
356
|
+ bindSet->SetBuffer(0, uboBuffer, 0, sizeof(ubo));
|
357
|
357
|
}
|
358
|
358
|
else
|
359
|
359
|
{
|