ULRE/inc/hgl/graph/mtl/UniformBuffer.h
2024-03-06 13:54:05 +08:00

25 lines
710 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include<hgl/graph/mtl/StdMaterial.h>
#include<hgl/graph/mtl/ShaderBuffer.h>
STD_MTL_NAMESPACE_BEGIN
/**
* 所有UBO的基类它即向生成器提供代码也可以为渲染器提供数据
*/
class UniformBuffer
{
private:
ShaderBufferSource *sbs;
public:
virtual const AnsiString &GetStructName ()const{return sbs->struct_name;} ///<取得结构名称
virtual const AnsiString &GetDefaultValueName ()const{return sbs->name;} ///<取得默认变量名称
virtual const AnsiString &GetShaderCodes ()const{return sbs->codes;} ///<取得Shader代码
};//class UniformBuffer
STD_MTL_NAMESPACE_END