2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09:47:43 +00:00

Function-scope statics aren't as efficient as file-scope ones

This commit is contained in:
Jack Andersen
2016-04-14 17:26:01 -10:00
parent c91bfade75
commit 86c21a77ac
12 changed files with 70 additions and 66 deletions

View File

@@ -270,6 +270,13 @@ void CElementGen::Shutdown()
CElementGenShaders::Shutdown();
}
static const size_t ShadClsSizes[] =
{
sizeof(SParticleInstanceTex),
sizeof(SParticleInstanceIndTex),
sizeof(SParticleInstanceNoTex)
};
CElementGen::CElementGen(const TToken<CGenDescription>& gen,
EModelOrientationType orientType,
EOptionalSystemFlags flags)
@@ -442,12 +449,6 @@ CElementGen::CElementGen(const TToken<CGenDescription>& gen,
else
{
m_shaderClass = CElementGenShaders::GetShaderClass(*this);
static const size_t ShadClsSizes[] =
{
sizeof(SParticleInstanceTex),
sizeof(SParticleInstanceIndTex),
sizeof(SParticleInstanceNoTex)
};
size_t maxInsts = x224_29_MBLR ? (m_maxMBSP * x70_MAXP) : x70_MAXP;
m_gfxToken = CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
{