removed ShaderCreateInfoFragment::UseDefaultMain
This commit is contained in:
parent
4ef37a430e
commit
ece7912f3c
@ -3,10 +3,6 @@
|
|||||||
#include<hgl/shadergen/ShaderCreateInfo.h>
|
#include<hgl/shadergen/ShaderCreateInfo.h>
|
||||||
|
|
||||||
namespace hgl{namespace graph{
|
namespace hgl{namespace graph{
|
||||||
enum class MaterialType
|
|
||||||
{
|
|
||||||
Color, ///<曾伎第窐
|
|
||||||
};
|
|
||||||
|
|
||||||
class ShaderCreateInfoFragment:public ShaderCreateInfo
|
class ShaderCreateInfoFragment:public ShaderCreateInfo
|
||||||
{
|
{
|
||||||
@ -16,7 +12,5 @@ public:
|
|||||||
|
|
||||||
ShaderCreateInfoFragment(MaterialDescriptorInfo *m):ShaderCreateInfo(VK_SHADER_STAGE_FRAGMENT_BIT,m){}
|
ShaderCreateInfoFragment(MaterialDescriptorInfo *m):ShaderCreateInfo(VK_SHADER_STAGE_FRAGMENT_BIT,m){}
|
||||||
~ShaderCreateInfoFragment()=default;
|
~ShaderCreateInfoFragment()=default;
|
||||||
|
|
||||||
void UseDefaultMain();
|
|
||||||
};
|
};
|
||||||
}}//namespace hgl::graph
|
}}//namespace hgl::graph
|
@ -5,30 +5,6 @@ namespace hgl{namespace graph{
|
|||||||
|
|
||||||
using namespace hgl::graph;
|
using namespace hgl::graph;
|
||||||
|
|
||||||
void ShaderCreateInfoFragment::UseDefaultMain()
|
|
||||||
{
|
|
||||||
AnsiString main_codes="void main()\n{\n";
|
|
||||||
|
|
||||||
const auto &output_list=sdm->GetShaderStageIO().output;
|
|
||||||
|
|
||||||
const ShaderAttribute *o=output_list.items;
|
|
||||||
|
|
||||||
for(uint i=0;i<output_list.count;i++)
|
|
||||||
{
|
|
||||||
main_codes+="\t";
|
|
||||||
main_codes+=o->name;
|
|
||||||
main_codes+="=Get";
|
|
||||||
main_codes+=o->name;
|
|
||||||
main_codes+="();\n";
|
|
||||||
|
|
||||||
++o;
|
|
||||||
}
|
|
||||||
|
|
||||||
main_codes+="}";
|
|
||||||
|
|
||||||
AddFunction(main_codes);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ShaderCreateInfoFragment::ProcOutput()
|
bool ShaderCreateInfoFragment::ProcOutput()
|
||||||
{
|
{
|
||||||
const auto &output_list=sdm->GetShaderStageIO().output;
|
const auto &output_list=sdm->GetShaderStageIO().output;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user