调整好坐标轴方向以及裁剪面,并增加最简易坐标轴绘制范例
This commit is contained in:
@@ -83,12 +83,9 @@ namespace hgl
|
||||
WO_FUNC_FROM_RENDER_FRAMEWORK(CreatePipeline,graph::Pipeline *)
|
||||
WO_FUNC_FROM_RENDER_FRAMEWORK(CreateMaterialInstance,graph::MaterialInstance *)
|
||||
WO_FUNC_FROM_RENDER_FRAMEWORK(GetPrimitiveCreater,SharedPtr<graph::PrimitiveCreater>)
|
||||
//WO_FUNC_FROM_RENDER_FRAMEWORK(CreatePrimitive,graph::Primitive *)
|
||||
WO_FUNC_FROM_RENDER_FRAMEWORK(CreateMesh,graph::Mesh *)
|
||||
|
||||
#undef WO_FUNC_FROM_RENDER_FRAMEWORK
|
||||
|
||||
|
||||
graph::Primitive *CreatePrimitive(const AnsiString &name,
|
||||
const uint32_t vertices_count,
|
||||
const graph::VIL *vil,
|
||||
@@ -97,6 +94,15 @@ namespace hgl
|
||||
return render_framework?render_framework->CreatePrimitive(name,vertices_count,vil,vad_list):nullptr;
|
||||
}
|
||||
|
||||
graph::Mesh *CreateMesh(const AnsiString &name,
|
||||
const uint32_t vertices_count,
|
||||
graph::MaterialInstance *mi,
|
||||
graph::Pipeline *pipeline,
|
||||
const std::initializer_list<graph::VertexAttribDataPtr> &vad_list)
|
||||
{
|
||||
return render_framework?render_framework->CreateMesh(name,vertices_count,mi,pipeline,vad_list):nullptr;
|
||||
}
|
||||
|
||||
public: //Component 相关
|
||||
|
||||
template<typename C,typename ...ARGS>
|
||||
|
@@ -19,14 +19,17 @@ struct Material3DCreateConfig:public MaterialCreateConfig,public Comparator<Mate
|
||||
|
||||
public:
|
||||
|
||||
Material3DCreateConfig(const PrimitiveType &p):MaterialCreateConfig(p)
|
||||
Material3DCreateConfig(const PrimitiveType &p,
|
||||
const WithCamera &wc=WithCamera::With,
|
||||
const WithLocalToWorld &l2w=WithLocalToWorld::With)
|
||||
:MaterialCreateConfig(p)
|
||||
{
|
||||
rt_output.color=1; //输出一个颜色
|
||||
rt_output.depth=true; //不输出深度
|
||||
rt_output.stencil=false; //不输出stencil
|
||||
|
||||
camera=true;
|
||||
local_to_world=false;
|
||||
camera=(wc==WithCamera::With);
|
||||
local_to_world=(l2w==WithLocalToWorld::With);
|
||||
|
||||
position_format=VAT_VEC3;
|
||||
|
||||
|
@@ -23,6 +23,12 @@ namespace hgl::graph
|
||||
|
||||
namespace mtl
|
||||
{
|
||||
enum class WithCamera:uint8
|
||||
{
|
||||
Without=0,
|
||||
With
|
||||
};
|
||||
|
||||
enum class WithLocalToWorld:uint8
|
||||
{
|
||||
Without=0,
|
||||
|
Reference in New Issue
Block a user