use CameraInfo instead of CameraMatrix
This commit is contained in:
parent
1dc5dd09a7
commit
1696c27cbb
@ -1 +1 @@
|
||||
Subproject commit 4b71f19e46167c9bb70bb11cf19b8f8c335d40b3
|
||||
Subproject commit 630770496d8d78dd6c06511ba180dbe4ddf14f94
|
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit 0a7b1ff3afd95e2c41a4476c1c00dec6511ad447
|
||||
Subproject commit 374da41a24097e2350d2f8221540d961667ab1f4
|
@ -1 +1 @@
|
||||
Subproject commit fd6fefe93ebf844945c6366d6927447549727bf1
|
||||
Subproject commit e107c2abd33ef3fa4176c3ba273618d4bac6dc54
|
@ -88,7 +88,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix =CreateUBO("camera", sizeof(CameraMatrix), &cam.matrix);
|
||||
ubo_camera_matrix =CreateUBO("camera", sizeof(CameraInfo), &cam.matrix);
|
||||
ubo_color_material =CreateUBO("color_material",sizeof(Vector4f), &color);
|
||||
ubo_line_config =CreateUBO("line2d_config", sizeof(Line2DConfig), &line_2d_config);
|
||||
|
||||
|
@ -81,7 +81,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&cam.matrix);
|
||||
|
||||
if(!ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -170,7 +170,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&cam.matrix);
|
||||
|
||||
if(!ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -58,7 +58,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&cam.matrix);
|
||||
|
||||
if(!ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -118,7 +118,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix =CreateUBO("camera", sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix =CreateUBO("camera", sizeof(CameraInfo),&cam.matrix);
|
||||
ubo_color_material =CreateUBO("color_material",sizeof(Vector4f),&color);
|
||||
|
||||
material_instance->Update();
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
|
||||
ro->cam.Refresh();
|
||||
|
||||
ro->ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&ro->cam.matrix);
|
||||
ro->ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&ro->cam.matrix);
|
||||
|
||||
if(!ro->ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -77,7 +77,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&cam.matrix);
|
||||
|
||||
if(!ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -62,7 +62,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&cam.matrix);
|
||||
|
||||
if(!ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -62,7 +62,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&cam.matrix);
|
||||
|
||||
if(!ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&cam.matrix);
|
||||
|
||||
if(!ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -65,7 +65,7 @@ private:
|
||||
|
||||
cam.Refresh();
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&cam.matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&cam.matrix);
|
||||
|
||||
if(!ubo_camera_matrix)
|
||||
return(false);
|
||||
|
@ -340,7 +340,7 @@ public:
|
||||
|
||||
camera->Refresh(); //更新矩阵计算
|
||||
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraMatrix),&camera->matrix);
|
||||
ubo_camera_matrix=db->CreateUBO(sizeof(CameraInfo),&camera->matrix);
|
||||
}
|
||||
|
||||
void Resize(int w,int h)override
|
||||
|
@ -54,7 +54,7 @@ namespace hgl
|
||||
|
||||
void Begin ();
|
||||
void Add (SceneNode *);
|
||||
void End (CameraMatrix *);
|
||||
void End (CameraInfo *);
|
||||
|
||||
bool Render (RenderCmdBuffer *);
|
||||
};//class RenderList
|
||||
|
@ -27,7 +27,7 @@ namespace hgl
|
||||
protected:
|
||||
|
||||
Camera * camera;
|
||||
CameraMatrix * camera_matrix;
|
||||
CameraInfo * camera_matrix;
|
||||
Frustum frustum;
|
||||
|
||||
protected:
|
||||
|
@ -20,7 +20,7 @@ namespace hgl
|
||||
GPUDevice *device;
|
||||
VkBufferUsageFlags buffer_usage_flags;
|
||||
|
||||
Collection<T> *coll;
|
||||
Collection *coll;
|
||||
|
||||
public:
|
||||
|
||||
@ -29,7 +29,13 @@ namespace hgl
|
||||
device=dev;
|
||||
buffer_usage_flags=flags;
|
||||
|
||||
coll=new Collection<T>(new MemoryBlock(new VKMemoryAllocator(device,buffer_usage_flags)));
|
||||
{
|
||||
const size_t unit_size=sizeof(T);
|
||||
VKMemoryAllocator *ma=new VKMemoryAllocator(device,buffer_usage_flags);
|
||||
MemoryBlock *mb=new MemoryBlock(ma);
|
||||
|
||||
coll=new Collection(unit_size,mb);
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~GPUArrayBuffer()
|
||||
|
@ -107,11 +107,12 @@ SET(VK_MEMORY_SOURCE ${SG_INCLUDE_PATH}/VKMemory.h
|
||||
${SG_INCLUDE_PATH}/VKBuffer.h
|
||||
${SG_INCLUDE_PATH}/VKVertexAttribBuffer.h
|
||||
${SG_INCLUDE_PATH}/VKIndexBuffer.h
|
||||
${SG_INCLUDE_PATH}/VKArrayBuffer.h
|
||||
# ${SG_INCLUDE_PATH}/VKArrayBuffer.h
|
||||
Vulkan/VKMemory.cpp
|
||||
Vulkan/VKMemoryAllocator.cpp
|
||||
Vulkan/VKBuffer.cpp
|
||||
Vulkan/VKArrayBuffer.cpp)
|
||||
# Vulkan/VKArrayBuffer.cpp
|
||||
)
|
||||
|
||||
SET(VK_DEVICE_SOURCE ${SG_INCLUDE_PATH}/VKDevice.h
|
||||
${SG_INCLUDE_PATH}/VKDeviceAttribute.h
|
||||
|
@ -57,7 +57,7 @@ namespace hgl
|
||||
scene_node_list.Add(node);
|
||||
}
|
||||
|
||||
void RenderList::End(CameraMatrix *camera_matrix)
|
||||
void RenderList::End(CameraInfo *camera_matrix)
|
||||
{
|
||||
//清0计数器
|
||||
uint32_t mvp_count=0; //local to world矩阵总数量
|
||||
|
Loading…
x
Reference in New Issue
Block a user