layout codes.
This commit is contained in:
parent
233523231e
commit
ed5aac2a9d
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit 462f0792835cc5022771a3594e312efa365a5fae
|
||||
Subproject commit 6155612605a079c84b666314c48e1704d2600554
|
@ -1 +1 @@
|
||||
Subproject commit 95ed7ae08b3c50055d2a162e22585c7c1cefc763
|
||||
Subproject commit 4d21058a12ed1ba1148436f1f0d550150251ff3e
|
25
inc/hgl/graph/StaticRenderManager.h
Normal file
25
inc/hgl/graph/StaticRenderManager.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef HGL_GRAPH_STATIC_RENDER_MANAGER_INCLUDE
|
||||
#define HGL_GRAPH_STATIC_RENDER_MANAGER_INCLUDE
|
||||
|
||||
#include<hgl/graph/VK.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
|
||||
class RawMesh
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* 静态渲染管理器<br>
|
||||
* 静态渲染指的是不会产生资源变动的内容,而不是指不会动的内容。
|
||||
*/
|
||||
class StaticRenderManager
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
virtual ~StaticRenderManager()=default;
|
||||
|
||||
};//class StaticRenderManager
|
||||
VK_NAMESPACE_END
|
||||
#endif//HGL_GRAPH_STATIC_RENDER_MANAGER_INCLUDE
|
@ -125,7 +125,7 @@ public: //Get
|
||||
DeviceBuffer * GetBuffer (const BufferID &id){return rm_buffers.Get(id);}
|
||||
Sampler * GetSampler (const SamplerID &id){return rm_samplers.Get(id);}
|
||||
Texture * GetTexture (const TextureID &id){return rm_textures.Get(id);}
|
||||
Renderable * GetRenderable (const RenderableID &id){return rm_renderables.Get(id);}
|
||||
Renderable * GetRenderable (const RenderableID &id){return rm_renderables.Get(id);}
|
||||
};//class RenderResource
|
||||
VK_NAMESPACE_END
|
||||
#endif//HGL_GRAPH_VULKAN_DATABASE_INCLUDE
|
||||
|
26
src/SceneGraph/StaticRenderManage.md
Normal file
26
src/SceneGraph/StaticRenderManage.md
Normal file
@ -0,0 +1,26 @@
|
||||
# 静态渲染管理
|
||||
|
||||
## 建立静态渲染管理的意义是什么?
|
||||
|
||||
静态渲染管理中的“静态”并不是指在场景中静止不动的所有物件,也不是指永远不会增加或删除的物件。
|
||||
而是说大部分时间,都会出现在场景中的物件。
|
||||
|
||||
它的意义为的是所有添加进管理器的模型原始资源,都会一直存在。与它们本身是否显示在画面中,并无关联。为的是避开对显存资源的动态调配。
|
||||
|
||||
在静态渲染管理器中的所有模型,会根据顶点数据格式(Vertex Input Format)分类。每种格式所有模型共用一个大的顶点缓冲对象(Vertex Buffer Object),以达到在渲染时渲染不同模型不会切换VBO的效果,并进一步达成一个格式,一次Drawcall全部画面的极致效果。
|
||||
|
||||
## 定义
|
||||
|
||||
1.Material 材质可以简单理解为是Shader的包装。
|
||||
|
||||
2.Vertex Input Layout 顶点输入布局,指的是在渲染中Material所需的顶点输入数据格式。
|
||||
|
||||
但需要注意的是:VertexInputLayout与Material并无从属关系。
|
||||
一个Material可能会有多个VertexInputLayout的版本,不同具体格式的数据输入.
|
||||
多个Material也可能会共用一个VertexInputLayout,比如为某个模型设定的不同画质渲染,它们shader不同,但是共用同一套模型数据。
|
||||
|
||||
3.Material Instance 材质实例是指同一材质下,不同的参数配置或不同的顶点输入格式。
|
||||
|
||||
## 我们需要做什么?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user