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

Fix maxVerts < 2 case

This commit is contained in:
2016-02-27 17:35:45 -08:00
parent 37da86838d
commit 97c8af9aa2
3 changed files with 7 additions and 2 deletions

View File

@@ -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;