mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Refactor.
This commit is contained in:
parent
de1d5e48ed
commit
d68e48c1b7
1 changed files with 15 additions and 42 deletions
|
@ -161,56 +161,29 @@ struct ShadowMapRenderTargets
|
||||||
|
|
||||||
void imguiEnum(SmImpl::Enum& _enum)
|
void imguiEnum(SmImpl::Enum& _enum)
|
||||||
{
|
{
|
||||||
if (imguiCheck("Hard", SmImpl::Hard == _enum) )
|
_enum = (SmImpl::Enum)imguiChoose(_enum
|
||||||
{
|
, "Hard"
|
||||||
_enum = SmImpl::Hard;
|
, "PCF"
|
||||||
}
|
, "VSM"
|
||||||
|
, "ESM"
|
||||||
if (imguiCheck("PCF", SmImpl::PCF == _enum) )
|
);
|
||||||
{
|
|
||||||
_enum = SmImpl::PCF;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (imguiCheck("VSM", SmImpl::VSM == _enum) )
|
|
||||||
{
|
|
||||||
_enum = SmImpl::VSM;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (imguiCheck("ESM", SmImpl::ESM == _enum) )
|
|
||||||
{
|
|
||||||
_enum = SmImpl::ESM;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void imguiEnum(DepthImpl::Enum& _enum)
|
void imguiEnum(DepthImpl::Enum& _enum)
|
||||||
{
|
{
|
||||||
if (imguiCheck("InvZ", DepthImpl::InvZ == _enum) )
|
_enum = (DepthImpl::Enum)imguiChoose(_enum
|
||||||
{
|
, "InvZ"
|
||||||
_enum = DepthImpl::InvZ;
|
, "Linear"
|
||||||
}
|
);
|
||||||
|
|
||||||
if (imguiCheck("Linear", DepthImpl::Linear == _enum) )
|
|
||||||
{
|
|
||||||
_enum = DepthImpl::Linear;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void imguiEnum(LightType::Enum& _enum)
|
void imguiEnum(LightType::Enum& _enum)
|
||||||
{
|
{
|
||||||
if (imguiCheck("Spot light", LightType::SpotLight == _enum) )
|
_enum = (LightType::Enum)imguiChoose(_enum
|
||||||
{
|
, "Spot light"
|
||||||
_enum = LightType::SpotLight;
|
, "Point light"
|
||||||
}
|
, "Directional light"
|
||||||
|
);
|
||||||
if (imguiCheck("Point light", LightType::PointLight == _enum) )
|
|
||||||
{
|
|
||||||
_enum = LightType::PointLight;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (imguiCheck("Directional light", LightType::DirectionalLight == _enum) )
|
|
||||||
{
|
|
||||||
_enum = LightType::DirectionalLight;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void imguiBool(const char* _str, bool& _flag, bool _enabled = true)
|
void imguiBool(const char* _str, bool& _flag, bool _enabled = true)
|
||||||
|
|
Loading…
Reference in a new issue