mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #27 from lioncash/constexpr
Backend: Make ExtensionSlot's constructor constexpr
This commit is contained in:
commit
ce4144952b
|
@ -194,7 +194,7 @@ struct Function {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ExtensionSlot {
|
struct ExtensionSlot {
|
||||||
const char* shaderMacro;
|
const char* shaderMacro = nullptr;
|
||||||
size_t texCount = 0;
|
size_t texCount = 0;
|
||||||
const Backend::TextureInfo* texs = nullptr;
|
const Backend::TextureInfo* texs = nullptr;
|
||||||
Backend::BlendFactor srcFactor = Backend::BlendFactor::Original;
|
Backend::BlendFactor srcFactor = Backend::BlendFactor::Original;
|
||||||
|
@ -209,14 +209,13 @@ struct ExtensionSlot {
|
||||||
bool forceAlphaTest = false;
|
bool forceAlphaTest = false;
|
||||||
bool diffuseOnly = false;
|
bool diffuseOnly = false;
|
||||||
|
|
||||||
ExtensionSlot(size_t texCount = 0,
|
constexpr ExtensionSlot(size_t texCount = 0, const Backend::TextureInfo* texs = nullptr,
|
||||||
const Backend::TextureInfo* texs = nullptr,
|
Backend::BlendFactor srcFactor = Backend::BlendFactor::Original,
|
||||||
Backend::BlendFactor srcFactor = Backend::BlendFactor::Original,
|
Backend::BlendFactor dstFactor = Backend::BlendFactor::Original,
|
||||||
Backend::BlendFactor dstFactor = Backend::BlendFactor::Original,
|
Backend::ZTest depthTest = Backend::ZTest::Original,
|
||||||
Backend::ZTest depthTest = Backend::ZTest::Original,
|
Backend::CullMode cullMode = Backend::CullMode::Backface, bool noDepthWrite = false,
|
||||||
Backend::CullMode cullMode = Backend::CullMode::Backface, bool noDepthWrite = false,
|
bool noColorWrite = false, bool noAlphaWrite = false, bool noAlphaOverwrite = false,
|
||||||
bool noColorWrite = false, bool noAlphaWrite = false, bool noAlphaOverwrite = false,
|
bool noReflection = false, bool forceAlphaTest = false, bool diffuseOnly = false) noexcept
|
||||||
bool noReflection = false, bool forceAlphaTest = false, bool diffuseOnly = false)
|
|
||||||
: texCount(texCount)
|
: texCount(texCount)
|
||||||
, texs(texs)
|
, texs(texs)
|
||||||
, srcFactor(srcFactor)
|
, srcFactor(srcFactor)
|
||||||
|
|
Loading…
Reference in New Issue