diff --git a/source/console/ui/ui_main.cpp b/source/console/ui/ui_main.cpp index 4f2294c..ab42ff0 100644 --- a/source/console/ui/ui_main.cpp +++ b/source/console/ui/ui_main.cpp @@ -7,7 +7,7 @@ #include "imgui/imgui_impl_opengl3.h" #include "scene/dvu_load_gltf.h" -#include "pipe/dvc_render_queue.h" +#include "pipe/dvc_render_pipe.h" #include "device/dvc_render_target.h" #include "shader/dvc_shader_interface.h" #include "buffer/dvu_dump_buffer.h" @@ -111,13 +111,13 @@ void drawMainUI() uniformBuffer.setAttribute("light0:position", lightNode->getWorldPosition()); } - davinci::RenderQueue queue; + davinci::RenderPipe queue; queue.build(g_scene); g_renderTarget.clear(); queue.process(g_aaTech, uniformBuffer, g_renderTarget); - davinci_utils::dump_render_target("d:\\rendertarget", g_renderTarget); + //davinci_utils::dump_render_target("d:\\rendertarget", g_renderTarget); } ImGui::End(); diff --git a/source/core/CMakeLists.txt b/source/core/CMakeLists.txt index 2be2dfe..469053d 100644 --- a/source/core/CMakeLists.txt +++ b/source/core/CMakeLists.txt @@ -106,7 +106,7 @@ source_group("source/device" FILES ${DV_CORE_DEVICE_SOURCE_FILES}) # pipe ################# set(DV_CORE_PIPE_INCLUDE_FILES - include/pipe/dvc_render_queue.h + include/pipe/dvc_render_pipe.h include/pipe/dvc_renderable.h include/pipe/dvc_renderable_entity.h include/pipe/dvc_render_step_IA.h @@ -117,7 +117,7 @@ set(DV_CORE_PIPE_INCLUDE_FILES source_group("include/pipe" FILES ${DV_CORE_PIPE_INCLUDE_FILES}) set(DV_CORE_PIPE_SOURCE_FILES - source/pipe/dvc_render_queue.cpp + source/pipe/dvc_render_pipe.cpp source/pipe/dvc_renderable.cpp source/pipe/dvc_renderable_entity.cpp source/pipe/dvc_render_step_IA.cpp diff --git a/source/core/include/dvc_pre_declare.h b/source/core/include/dvc_pre_declare.h index 61b16ed..c796115 100644 --- a/source/core/include/dvc_pre_declare.h +++ b/source/core/include/dvc_pre_declare.h @@ -60,7 +60,7 @@ class LightComponent; typedef std::shared_ptr LightComponentPtr; typedef std::shared_ptr LightComponentConstPtr; -class RenderQueue; +class RenderPipe; class Renderable; typedef std::shared_ptr RenderablePtr; diff --git a/source/core/include/pipe/dvc_render_queue.h b/source/core/include/pipe/dvc_render_pipe.h similarity index 89% rename from source/core/include/pipe/dvc_render_queue.h rename to source/core/include/pipe/dvc_render_pipe.h index afcfeb3..7aa8c91 100644 --- a/source/core/include/pipe/dvc_render_queue.h +++ b/source/core/include/pipe/dvc_render_pipe.h @@ -6,7 +6,7 @@ DV_CORE_BEGIN_NAMESPACE -class DV_CORE_API RenderQueue +class DV_CORE_API RenderPipe { public: void pushRenderable(RenderableConstPtr renderable); @@ -25,8 +25,8 @@ protected: std::vector m_queue; public: - RenderQueue(); - ~RenderQueue(); + RenderPipe(); + ~RenderPipe(); }; DV_CORE_END_NAMESPACE diff --git a/source/core/include/pipe/dvc_render_step_IA.h b/source/core/include/pipe/dvc_render_step_IA.h index f662e2d..7610ee2 100644 --- a/source/core/include/pipe/dvc_render_step_IA.h +++ b/source/core/include/pipe/dvc_render_step_IA.h @@ -2,7 +2,7 @@ #include "dvc_config.h" #include "math/dvc_matrix4.h" -#include "dvc_render_queue.h" +#include "dvc_render_pipe.h" DV_CORE_BEGIN_NAMESPACE @@ -22,7 +22,7 @@ public: typedef std::vector NodeArray; public: - void process(const RenderQueue& renderQueue); + void process(const RenderPipe& renderQueue); public: NodeArray m_nodes; diff --git a/source/core/include/scene/component/dvc_camera_component.h b/source/core/include/scene/component/dvc_camera_component.h index 6bc8111..103ff0e 100644 --- a/source/core/include/scene/component/dvc_camera_component.h +++ b/source/core/include/scene/component/dvc_camera_component.h @@ -18,7 +18,7 @@ public: }; public: virtual const std::string& getTypeName() const { return typeName(); } - virtual void render(const fMatrix4& transParent, RenderQueue& queue) const; + virtual void render(const fMatrix4& transParent, RenderPipe& queue) const; fVector3 getEye(void) const; fVector3 getLookat(void) const; diff --git a/source/core/include/scene/component/dvc_component.h b/source/core/include/scene/component/dvc_component.h index c0fc45d..5560fb8 100644 --- a/source/core/include/scene/component/dvc_component.h +++ b/source/core/include/scene/component/dvc_component.h @@ -9,7 +9,7 @@ class DV_CORE_API SceneComponent { public: virtual const std::string& getTypeName() const = 0; - virtual void render(const fMatrix4& transParent, RenderQueue& queue) const; + virtual void render(const fMatrix4& transParent, RenderPipe& queue) const; protected: SceneNodePtr m_owner; diff --git a/source/core/include/scene/component/dvc_light_component.h b/source/core/include/scene/component/dvc_light_component.h index fa98a3c..6fa77cb 100644 --- a/source/core/include/scene/component/dvc_light_component.h +++ b/source/core/include/scene/component/dvc_light_component.h @@ -27,7 +27,7 @@ public: }; public: virtual const std::string& getTypeName() const { return typeName(); } - virtual void render(const fMatrix4& transParent, RenderQueue& queue) const; + virtual void render(const fMatrix4& transParent, RenderPipe& queue) const; void setLightDefine(const LightDefine& lightDefine); protected: diff --git a/source/core/include/scene/component/dvc_mesh_component.h b/source/core/include/scene/component/dvc_mesh_component.h index 3dd9c13..7a33681 100644 --- a/source/core/include/scene/component/dvc_mesh_component.h +++ b/source/core/include/scene/component/dvc_mesh_component.h @@ -9,7 +9,7 @@ class DV_CORE_API MeshComponent : public SceneComponent { public: virtual const std::string& getTypeName() const { return typeName(); } - virtual void render(const fMatrix4& transParent, RenderQueue& queue) const; + virtual void render(const fMatrix4& transParent, RenderPipe& queue) const; void setMesh(MeshConstPtr mesh); diff --git a/source/core/include/scene/dvc_scene_node.h b/source/core/include/scene/dvc_scene_node.h index f33b993..a89aa40 100644 --- a/source/core/include/scene/dvc_scene_node.h +++ b/source/core/include/scene/dvc_scene_node.h @@ -55,7 +55,7 @@ public: } public: - void buildRenderQueue(const fMatrix4& transParent, RenderQueue& queue); + void buildRenderQueue(const fMatrix4& transParent, RenderPipe& queue); protected: std::string m_name; diff --git a/source/core/source/pipe/dvc_render_queue.cpp b/source/core/source/pipe/dvc_render_pipe.cpp similarity index 71% rename from source/core/source/pipe/dvc_render_queue.cpp rename to source/core/source/pipe/dvc_render_pipe.cpp index e2c85c6..860e764 100644 --- a/source/core/source/pipe/dvc_render_queue.cpp +++ b/source/core/source/pipe/dvc_render_pipe.cpp @@ -1,4 +1,4 @@ -#include "pipe/dvc_render_queue.h" +#include "pipe/dvc_render_pipe.h" #include "scene/dvc_scene_node.h" #include "pipe/dvc_render_step_IA.h" #include "pipe/dvc_render_step_VS.h" @@ -8,22 +8,22 @@ DV_CORE_BEGIN_NAMESPACE -RenderQueue::RenderQueue() +RenderPipe::RenderPipe() { } -RenderQueue::~RenderQueue() +RenderPipe::~RenderPipe() { } -void RenderQueue::pushRenderable(RenderableConstPtr renderable) +void RenderPipe::pushRenderable(RenderableConstPtr renderable) { m_queue.push_back(renderable); } -RenderableConstPtr RenderQueue::getRenderable(size_t index) const +RenderableConstPtr RenderPipe::getRenderable(size_t index) const { assert(index < m_queue.size()); if (index < m_queue.size()) @@ -33,13 +33,13 @@ RenderableConstPtr RenderQueue::getRenderable(size_t index) const return nullptr; } -void RenderQueue::build(const Scene& scene) +void RenderPipe::build(const Scene& scene) { //Build render queue scene.getRootSceneNode()->buildRenderQueue(fMatrix4::IDENTITY, *this); } -void RenderQueue::process(AntiAliasingTech aaTech, UniformBuffer& uniformBuffer, RenderTarget& renderTarget) +void RenderPipe::process(AntiAliasingTech aaTech, UniformBuffer& uniformBuffer, RenderTarget& renderTarget) { m_aaTech = aaTech; diff --git a/source/core/source/pipe/dvc_render_step_IA.cpp b/source/core/source/pipe/dvc_render_step_IA.cpp index cd93695..3585545 100644 --- a/source/core/source/pipe/dvc_render_step_IA.cpp +++ b/source/core/source/pipe/dvc_render_step_IA.cpp @@ -3,7 +3,7 @@ DV_CORE_BEGIN_NAMESPACE -void InputAssemberStep::process(const RenderQueue& renderQueue) +void InputAssemberStep::process(const RenderPipe& renderQueue) { size_t counts = renderQueue.getRenderableCounts(); for (size_t i = 0; i < counts; i++) diff --git a/source/core/source/scene/component/dvc_camera_component.cpp b/source/core/source/scene/component/dvc_camera_component.cpp index 1a720c3..2fb50b1 100644 --- a/source/core/source/scene/component/dvc_camera_component.cpp +++ b/source/core/source/scene/component/dvc_camera_component.cpp @@ -51,7 +51,7 @@ void CameraComponent::setCameraDefine(const CameraComponent::CameraDefine& camer m_viewProjMatrix = matProj * matView; } -void CameraComponent::render(const fMatrix4& transParent, RenderQueue& queue) const +void CameraComponent::render(const fMatrix4& transParent, RenderPipe& queue) const { } diff --git a/source/core/source/scene/component/dvc_component.cpp b/source/core/source/scene/component/dvc_component.cpp index b7f4d5f..b3ca646 100644 --- a/source/core/source/scene/component/dvc_component.cpp +++ b/source/core/source/scene/component/dvc_component.cpp @@ -13,7 +13,7 @@ SceneComponent::~SceneComponent() } -void SceneComponent::render(const fMatrix4& transParent, RenderQueue& queue) const +void SceneComponent::render(const fMatrix4& transParent, RenderPipe& queue) const { } diff --git a/source/core/source/scene/component/dvc_light_component.cpp b/source/core/source/scene/component/dvc_light_component.cpp index b06fede..d19e704 100644 --- a/source/core/source/scene/component/dvc_light_component.cpp +++ b/source/core/source/scene/component/dvc_light_component.cpp @@ -24,7 +24,7 @@ void LightComponent::setLightDefine(const LightDefine& lightDefine) m_define = lightDefine; } -void LightComponent::render(const fMatrix4& transParent, RenderQueue& queue) const +void LightComponent::render(const fMatrix4& transParent, RenderPipe& queue) const { } diff --git a/source/core/source/scene/component/dvc_mesh_component.cpp b/source/core/source/scene/component/dvc_mesh_component.cpp index 2015558..afeb275 100644 --- a/source/core/source/scene/component/dvc_mesh_component.cpp +++ b/source/core/source/scene/component/dvc_mesh_component.cpp @@ -1,7 +1,7 @@ #include "scene/component/dvc_mesh_component.h" #include "asset/dvc_mesh.h" #include "pipe/dvc_renderable_entity.h" -#include "pipe/dvc_render_queue.h" +#include "pipe/dvc_render_pipe.h" DV_CORE_BEGIN_NAMESPACE @@ -27,7 +27,7 @@ void MeshComponent::setMesh(MeshConstPtr mesh) m_mesh = mesh; } -void MeshComponent::render(const fMatrix4& transParent, RenderQueue& queue) const +void MeshComponent::render(const fMatrix4& transParent, RenderPipe& queue) const { SceneComponent::render(transParent, queue); diff --git a/source/core/source/scene/dvc_scene_node.cpp b/source/core/source/scene/dvc_scene_node.cpp index 888f610..92610e4 100644 --- a/source/core/source/scene/dvc_scene_node.cpp +++ b/source/core/source/scene/dvc_scene_node.cpp @@ -89,7 +89,7 @@ SceneComponentConstPtr SceneNode::getComponent(size_t index) const return m_componentArray[index]; } -void SceneNode::buildRenderQueue(const fMatrix4& transParent, RenderQueue& queue) +void SceneNode::buildRenderQueue(const fMatrix4& transParent, RenderPipe& queue) { fMatrix4 transform = m_transform * transParent;