浏览代码

버퍼 갱신 크기오류 수정

Hongtae Kim 6 年前
父节点
当前提交
d0424c92d9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      Samples/Mesh/Mesh.cpp

+ 2
- 2
Samples/Mesh/Mesh.cpp 查看文件

324
                 //ubo.modelMatrix.Multiply(trans.Matrix4());
324
                 //ubo.modelMatrix.Multiply(trans.Matrix4());
325
 
325
 
326
                 //memcpy(uboBuffer->Contents(), &ubo, sizeof(ubo));
326
                 //memcpy(uboBuffer->Contents(), &ubo, sizeof(ubo));
327
-                bindSet->SetBuffer(0, uboBuffer, 0, sizeof(ubo));
327
+                bindSet->SetBuffer(0, uboBuffer, 0, sizeof(UBO));
328
             }
328
             }
329
 			         
329
 			         
330
             bindSet->SetTexture(1, texture);
330
             bindSet->SetTexture(1, texture);
393
                     DKAffineTransform3 trans = tm * DKAffineTransform3(quat);
393
                     DKAffineTransform3 trans = tm * DKAffineTransform3(quat);
394
                     ubo->modelMatrix = trans.Matrix4();
394
                     ubo->modelMatrix = trans.Matrix4();
395
                     uboBuffer->Flush();
395
                     uboBuffer->Flush();
396
-                    bindSet->SetBuffer(0, uboBuffer, 0, sizeof(ubo));
396
+                    bindSet->SetBuffer(0, uboBuffer, 0, sizeof(UBO));
397
                 }
397
                 }
398
 
398
 
399
 				encoder->SetRenderPipelineState(pipelineState);
399
 				encoder->SetRenderPipelineState(pipelineState);