too many primitives (65535 instead of 4294967296)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Quadorrli
Posts: 6
Joined: Tue Jul 29, 2008 3:31 pm
Location: Winti

too many primitives (65535 instead of 4294967296)

Post by Quadorrli »

hello

i'm trying to create a large terrain as IAnimatedMeshSceneNode due to LOD.

it's a lot of terrain :lol:
At some time the terrain disapeares and i get the errormessage from bellow.

it seems to have a maximum of 4294967296 but i can not draw that many as the errormessage states :!:

does someone know why it says that the maximum of primitives is 65535 (which is the limit of u16) and not 4294967296?

Codeextraction from CNullDriver.cpp:

Code: Select all

//! Returns the maximum amount of primitives (mostly vertices) which
//! the device is able to render with one drawIndexedTriangleList
//! call.
u32 CNullDriver::getMaximalPrimitiveCount() const
{
	return 0xFFFFFFFF;
}


//! checks triangle count and print warning if wrong
bool CNullDriver::checkPrimitiveCount(u32 prmCount) const
{
	const u32 m = getMaximalPrimitiveCount();

	if (prmCount > m)
	{
		char tmp[1024];
		sprintf(tmp,"Could not draw triangles, too many primitives(%u), maxium is %u.", prmCount, m);
		os::Printer::log(tmp, ELL_ERROR);
		return false;
	}

	return true;
}
Post Reply