rename RenderQueue to RenderPipe

This commit is contained in:
2025-08-25 22:42:25 +08:00
parent 1f7720d54e
commit 0f9f81d568
17 changed files with 30 additions and 30 deletions
+3 -3
View File
@@ -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();
+2 -2
View File
@@ -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
+1 -1
View File
@@ -60,7 +60,7 @@ class LightComponent;
typedef std::shared_ptr<LightComponent> LightComponentPtr;
typedef std::shared_ptr<const LightComponent> LightComponentConstPtr;
class RenderQueue;
class RenderPipe;
class Renderable;
typedef std::shared_ptr<Renderable> RenderablePtr;
@@ -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<RenderableConstPtr> m_queue;
public:
RenderQueue();
~RenderQueue();
RenderPipe();
~RenderPipe();
};
DV_CORE_END_NAMESPACE
@@ -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<Node> NodeArray;
public:
void process(const RenderQueue& renderQueue);
void process(const RenderPipe& renderQueue);
public:
NodeArray m_nodes;
@@ -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;
@@ -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;
@@ -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:
@@ -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);
+1 -1
View File
@@ -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;
@@ -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;
@@ -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++)
@@ -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
{
}
@@ -13,7 +13,7 @@ SceneComponent::~SceneComponent()
}
void SceneComponent::render(const fMatrix4& transParent, RenderQueue& queue) const
void SceneComponent::render(const fMatrix4& transParent, RenderPipe& queue) const
{
}
@@ -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
{
}
@@ -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);
+1 -1
View File
@@ -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;