- Published on
Engine Structure
- Authors
- Name
- Yue Zhang
Source
source
├── editor/
│ ├── asset/
| | └── asset_ui.cpp/h
│ ├── base/
| | └── editor_ui.cpp/h
│ ├── log/
| | └── log_ui.cpp/h
│ ├── menu/
| | └── menu_ui.cpp/h
│ ├── property/
| | └── property_ui.cpp/h
│ ├── resource/
| | └── png
│ ├── simulation/
| | └── simulation_ui.cpp/h
│ ├── world/
| | └── world_ui.cpp/h
| ├── editor.cpp/h
| └── main.cpp
└── runtime/
├── core/
│ ├── base/
| | └── macro.h
│ ├── log/
| | └── log_system.cpp/h
│ ├── math/
| | ├── bounding_box.cpp/h
| | └── transform.cpp/h
│ └── vulkan/
| ├── vulkan_rhi.cpp/h
| └── vulkan_util.cpp/h
├── function/
│ ├── framework/
| │ ├── component/
| | │ ├── component.h
| | │ └── static_mesh_component.cpp/h
| │ ├── entity/
| | │ └── entity.cpp/h
| │ └── world/
| | │ └── world.cpp/h
| | │ └── world_manager.cpp/h
│ ├── global/
| | └── runtim_context.cpp/h
│ └── render/
| ├── render_data.cpp/h
| ├── render_system.cpp/h
| ├── window_system.cpp/h
| └── pass/
| ├── base_pass.cpp/h
| ├── render_pass.cpp/h
| └── ui_pass.cpp/h
├── paltform/
│ ├── container/
| | └── ts_queue.h
│ ├── file/
| | └── file_system.cpp/h
│ ├── string/
| | └── string_util.cpp/h
│ └── timer/
| └── timer.cpp/h
└── resource/
├── asset/
│ ├── animation.cpp/h
│ ├── asset_manager.cpp/h
│ ├── material.cpp/h
│ ├── skeletal_mesh.cpp/h
│ ├── skeleton.cpp/h
│ ├── static_mesh.cpp/h
│ ├── texture_2d.cpp/h
│ ├── texture_cube.cpp/h
│ └── base/
| ├── asset.cpp/h
| ├── bone.cpp/h
| ├── mesh.cpp/h
| ├── sub_mesh.cpp/h
| └── texture.cpp/h
├── config/
│ └── config_manager.cpp/h
└── shader/
└── shader_manager.cpp/h
Editor
Asset
asset_ui.cpp/h
Base
editor_ui.cpp/h
Log
log_ui.cpp/h
Menu
menu_ui.cpp/h
Property
property_ui.cpp/h
Resource
png
Simulation
simulation_ui.cpp/h
World
world_ui.cpp/h
editor.cpp/h
and main.cpp
- init()
- 调用所有UI的init()
- 通过 RederSystem::setConstructUIFunc 将 UIPass 的 UIPass::m_construct_func 设置为
for (auto& editor_ui : m_editor_uis) { editor_ui->construct(); // 如何用IMGUI搭建UI界面 }
Runtime
engine.cpp/h
Core
Base
macro.h
Log
Math
bounding_box.cpp/h
transform.cpp/h
Vulkan
vulkan_rhi.cpp/h:包含(除了renderpass,frambuffer)常见的vulkan概念。虽然包含了
vulkan_util.h
但只是使用了vulkan与vma头文件vulkan_util.cpp/h
Function
Framework
- Component
component.h
static_mesh_component.cpp/h
- Entity
entity.cpp/h
- World
world.cpp/h
world_manager.cpp/h
- Component
Global
runtim_context.cpp/h 创建以及初始化
- Timer
- file system
- log system
- config manager
- window system
- VulkanRHI
- shader manager
- asset manager
- world manager
- render system
Render
render_data.cpp/h
- VertPCO:
- FragPCO:
- RenderData: - vertexBuffer and IndexBuffer - 每一个submesh的index count 和 index offset
- MeshRenderData:
- vertexBuffer and IndexBuffer
- 每一个submesh的index count 和 index offset
- vector of UBO's Descriptor and texture's descriptor
- Push Constant Object
- 初始化了 BasePass 和 UIPass 放入 m_render_passes
- 设置 VulkanRHI的 VulkanRHICallbacks
tick(delta_time) : 调用VulkanRHI::render
- 调用了UIPass的 createResizableObjects 创建 framebuffer
onRecordFrame(commandBuffer, flight_index):遍历 m_render_passes中所有的renderpass 调用他们的 record 函数 。
- render_pass.cpp/h
包含了 descriptor Pool, descriptor Set layout, pipeline and pipeline layout, renderpass Handle, vector of RenderData
base_pass.cpp/h
- 初始化: 建立renderpass(subpass 和 attachments),建立pipeline layout和pipeline
- 创建framebuffer: 创建了depth和color的image与imageview, 并用这两个创建了一个framebuffer
- 封装了Record: renderpass begin , renderpass end
ui_pass.cpp/h
Platform
Container
ts_queue.h
File
- file_system.cpp/h
String
string_util.cpp/h
Timer