renamed the name from "WorldMatrix" to "CameraMatrix"
This commit is contained in:
@@ -300,7 +300,7 @@ class CameraAppFramework:public VulkanApplicationFramework
|
||||
{
|
||||
private:
|
||||
|
||||
GPUBuffer * ubo_world_matrix =nullptr;
|
||||
GPUBuffer * ubo_camera_matrix =nullptr;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
|
||||
camera->Refresh(); //更新矩阵计算
|
||||
|
||||
ubo_world_matrix=db->CreateUBO(sizeof(WorldMatrix),&camera->matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&camera->matrix);
|
||||
}
|
||||
|
||||
void Resize(int w,int h)override
|
||||
@@ -351,7 +351,7 @@ public:
|
||||
|
||||
GPUBuffer *GetCameraMatrixBuffer()
|
||||
{
|
||||
return ubo_world_matrix;
|
||||
return ubo_camera_matrix;
|
||||
}
|
||||
|
||||
virtual void BuildCommandBuffer(uint32_t index)=0;
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
virtual void Draw()override
|
||||
{
|
||||
camera->Refresh(); //更新相机矩阵
|
||||
ubo_world_matrix->Write(&camera->matrix); //写入缓冲区
|
||||
ubo_camera_matrix->Write(&camera->matrix); //写入缓冲区
|
||||
|
||||
const uint32_t index=AcquireNextImage();
|
||||
|
||||
|
Reference in New Issue
Block a user