added PureColor2D.cpp
This commit is contained in:
@@ -52,14 +52,20 @@ public:
|
||||
MaterialCreateInfo(const MaterialConfig *);
|
||||
~MaterialCreateInfo()=default;
|
||||
|
||||
bool SetMaterialInstance(const AnsiString &codes,const uint32_t length)
|
||||
/**
|
||||
* 设置材质实例代码与数据长度
|
||||
* @param mi_glsl_codes 材质实例GLSL代码
|
||||
* @param mi_struct_bytes 单个材质实例数据长度
|
||||
* @return 是否设置成功
|
||||
*/
|
||||
bool SetMaterialInstance(const AnsiString &mi_glsl_codes,const uint32_t mi_struct_bytes)
|
||||
{
|
||||
if(length>0&&codes.Length()<4)return(false);
|
||||
if(mi_struct_bytes>0&&mi_glsl_codes.Length()<4)return(false);
|
||||
|
||||
mi_length=length;
|
||||
mi_length=mi_struct_bytes;
|
||||
|
||||
if(length>0)
|
||||
mi_codes=codes;
|
||||
if(mi_struct_bytes>0)
|
||||
mi_codes=mi_glsl_codes;
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user