mirror of https://github.com/AxioDL/metaforce.git
Fix maxVerts < 2 case
This commit is contained in:
parent
37da86838d
commit
97c8af9aa2
|
@ -21,7 +21,7 @@ namespace URDE
|
|||
void ViewManager::BuildTestPART(pshag::IObjectStore& objStore)
|
||||
{
|
||||
//m_partGenDesc = objStore.GetObj({HECL::FOURCC('PART'), 0x972A5CD2});
|
||||
m_partGenDesc = objStore.GetObj("PART_EnvRainSplash");
|
||||
m_partGenDesc = objStore.GetObj("BusterSparks");
|
||||
m_partGen.reset(new pshag::CElementGen(m_partGenDesc,
|
||||
pshag::CElementGen::EModelOrientationType::Normal,
|
||||
pshag::CElementGen::EOptionalSystemFlags::None));
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
namespace pshag
|
||||
{
|
||||
LogVisor::LogModule LineRendererLog("pshag::CLineRenderer");
|
||||
|
||||
boo::IShaderPipeline* CLineRendererShaders::m_texAlpha = nullptr;
|
||||
boo::IShaderPipeline* CLineRendererShaders::m_texAdditive = nullptr;
|
||||
|
@ -107,7 +108,10 @@ CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts, boo::ITexture* t
|
|||
: m_mode(mode), m_maxVerts(maxVerts)
|
||||
{
|
||||
if (maxVerts < 2)
|
||||
{
|
||||
LineRendererLog.report(LogVisor::FatalError, _S("maxVerts < 2, maxVerts = %i"), maxVerts);
|
||||
return;
|
||||
}
|
||||
m_textured = texture != nullptr;
|
||||
|
||||
u32 maxTriVerts;
|
||||
|
|
|
@ -426,8 +426,9 @@ CElementGen::CElementGen(const TToken<CGenDescription>& gen,
|
|||
boo::ITexture* tex = nullptr;
|
||||
if (texr)
|
||||
tex = texr->GetValueTexture(0).GetObj()->GetBooTexture();
|
||||
int maxVerts = (x70_MAXP == 0 ? 256 : x70_MAXP);
|
||||
m_lineRenderer.reset(new CLineRenderer(CLineRenderer::EPrimitiveMode::Lines,
|
||||
x70_MAXP * 2, tex, x224_26_AAPH));
|
||||
maxVerts * 2, tex, x224_26_AAPH));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue