Graphics/OBJLoader: Allow users to specifiy a vertex count cache when loading

Former-commit-id: 87ebc2aefe2c2091fd483793f880724e1ed6ac3d
This commit is contained in:
Lynix
2016-03-08 13:39:08 +01:00
parent dce587bd63
commit c935c1a293
3 changed files with 11 additions and 7 deletions

View File

@@ -133,8 +133,12 @@ namespace Nz
bool Load(Model* model, Stream& stream, const ModelParameters& parameters)
{
int reservedVertexCount;
if (!parameters.custom.GetIntegerParameter("NativeOBJLoader_VertexCount", &reservedVertexCount))
reservedVertexCount = 100;
OBJParser parser(stream);
if (!parser.Parse())
if (!parser.Parse(reservedVertexCount))
{
NazaraError("OBJ parser failed");
return false;