//! 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;
}
does someone know why it says that the maximum of primitives is 65535 (which is the limit of u16) and not 4294967296
The CNullDriver implementation of getMaximalPrimitiveCount() is a fallback in case the derived driver doesn't implement it. The value there is wrong, but that shouldn't matter. Actually, the result should always be 65535 or less because Irrlicht uses 16-bit index buffers internally (until 32-bit index buffers are fully supported).
Travis
Last edited by vitek on Fri Aug 15, 2008 3:43 pm, edited 1 time in total.
Why are you trying to use An animated mesh scene node for terrain?
If you want to render a large terrain there are quite a few solutions on this forum which will be easier to use, such as Arras' tiled terrain scene node.
the terrain does not need to be an animatedmeshscenenode (meshscenenode works too) however does the terrain need to be loaded at runtime via a recalculated mesh,
since i'm using terrain engine libmini with Irrlicht http://irrlicht.sourceforge.net/phpBB2/ ... 03&start=0.
is there a way to apend an irregular mesh (sort of heightfield with gaps) to a terrain?
i really like stefan röttgers algorythm!
if you have a better idea how to use this alg. i would be glad to read...
I've updated the libmini example from their webpage to recent Irrlicht 1.4.x, it should be available from the libmini page anytime soon. Just ask those people, they have the full sources for some time now.
32bit indices need a proper interface, and cannot be made the general default due to performance reasons. But Luke's working on this issue, so it might be in one of the next releases.
You can easily update a mesh from a mesh scene node, the API should be clear enough to easily find the correct way.