redefine folder tree of material
This commit is contained in:
parent
93d680926e
commit
e77cb00e89
3
inc/hgl/graph/material/ComboMaterial.h
Normal file
3
inc/hgl/graph/material/ComboMaterial.h
Normal file
@ -0,0 +1,3 @@
|
||||
#ifndef HGL_GRAPH_COMBO_MATERIAL_INCLUDE
|
||||
#define HGL_GRAPH_COMBO_MATERIAL_INCLUDE
|
||||
#endif//HGL_GRAPH_COMBO_MATERIAL_INCLUDE
|
@ -3,8 +3,11 @@
|
||||
|
||||
#include<hgl/type/DataType.h>
|
||||
|
||||
#define BEGIN_MATERIAL_NAMESPACE namespace hgl{namespace graph{namespace material{
|
||||
#define END_MATERIAL_NAMESPACE }}}
|
||||
#define BEGIN_MATERIAL_NAMESPACE namespace hgl{namespace graph{namespace material{
|
||||
#define END_MATERIAL_NAMESPACE }}}
|
||||
|
||||
#define MATERIAL_NAMESPACE hgl::graph::material
|
||||
#define USING_MATERIAL_NAMESPACE using namespace MATERIAL_NAMESPACE;
|
||||
|
||||
BEGIN_MATERIAL_NAMESPACE
|
||||
enum class Component
|
@ -1,7 +1,7 @@
|
||||
#ifndef HGL_GRAPH_MATERIAL_INCLUDE
|
||||
#define HGL_GRAPH_MATERIAL_INCLUDE
|
||||
|
||||
#include<hgl/graph/MaterialComponent.h>
|
||||
#include<hgl/graph/material/Component.h>
|
||||
BEGIN_MATERIAL_NAMESPACE
|
||||
enum class BlendMode
|
||||
{
|
||||
@ -15,7 +15,7 @@ BEGIN_MATERIAL_NAMESPACE
|
||||
BEGIN_RANGE =Opaque,
|
||||
END_RANGE =PreMultiAlpha,
|
||||
RANGE_SIZE =END_RANGE-BEGIN_RANGE+1
|
||||
};//
|
||||
};//enum class BlendMode
|
||||
|
||||
class Material
|
||||
{
|
@ -1,10 +1,9 @@
|
||||
SET(SG_MATERIAL_SOURCE ${ROOT_INCLUDE_PATH}/hgl/graph/MaterialComponent.h
|
||||
${ROOT_INCLUDE_PATH}/hgl/graph/Material.h
|
||||
file(GLOB SG_MATERIAL_HEADER ${ROOT_INCLUDE_PATH}/hgl/graph/material/*.*)
|
||||
|
||||
MaterialComponent.cpp
|
||||
Material.cpp)
|
||||
file(GLOB SG_MATERIAL_SOURCE material/*.*)
|
||||
|
||||
SOURCE_GROUP("Material" FILES ${SG_MATERIAL_SOURCE})
|
||||
SOURCE_GROUP("Material" FILES ${SG_MATERIAL_HEADER}
|
||||
${SG_MATERIAL_SOURCE})
|
||||
|
||||
SET(SG_VERTEX_SOURCE ${ROOT_INCLUDE_PATH}/hgl/graph/VertexBufferCreater.h
|
||||
${ROOT_INCLUDE_PATH}/hgl/graph/VertexBuffer.h)
|
||||
@ -46,5 +45,7 @@ SOURCE_GROUP("Source Files" FILES ${SCENE_GRAPH_SOURCE})
|
||||
add_cm_library(ULRE.SceneGraph "ULRE" ${SCENE_GRAPH_HEADER}
|
||||
${SCENE_GRAPH_SOURCE}
|
||||
|
||||
${SG_MATERIAL_HEADER}
|
||||
${SG_MATERIAL_SOURCE}
|
||||
|
||||
${SG_VERTEX_SOURCE})
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include<hgl/graph/Material.h>
|
||||
#include<hgl/graph/material/Material.h>
|
||||
#include<hgl/io/FileInputStream.h>
|
||||
#include<hgl/io/DataInputStream.h>
|
||||
#include<hgl/log/LogInfo.h>
|
@ -1,4 +1,4 @@
|
||||
#include<hgl/graph/MaterialComponent.h>
|
||||
#include<hgl/graph/material/Component.h>
|
||||
|
||||
BEGIN_MATERIAL_NAMESPACE
|
||||
namespace
|
||||
@ -35,7 +35,7 @@ BEGIN_MATERIAL_NAMESPACE
|
||||
const ComponentConfig *GetConfig(const enum class Component c)
|
||||
{
|
||||
if(c<=Component::BEGIN_RANGE
|
||||
||c>=Component::END_RANGE)return(nullptr);
|
||||
||c>=Component::END_RANGE)return(nullptr);
|
||||
|
||||
return material_component_config_list+(uint)c;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user