Page 1 of 1

Could not draw object, too many primitives.

Posted: Tue Oct 04, 2005 3:13 pm
by Myth
Could not draw triangles, too many primitves (about 12000) maximum is about 6000.
The numbers for max and for primitves of that object aren't that precise in that quite but it is somehting similar.

How can I disable this error?
I don't get low frame rate at all...


Can I safely edit this?

Code: Select all

//! Returns the maximum amount of primitives (mostly vertices) which
//! the device is able to render with one drawIndexedTriangleList
//! call.
s32 CVideoNull::getMaximalPrimitiveCount()
{
return 65535;
} 
Thanks,
- Myth

Posted: Tue Oct 04, 2005 3:50 pm
by BlackNinjaGames
I dont think thats a good idea. Im sure its GPU dependant. So although yours supports it, many other might not.

But im not too sure...

Posted: Tue Oct 04, 2005 6:38 pm
by Spintz
Yes you should. For DirectX, the maxPrimitiveCount is gotten from the D3DCAPS structure, however, OpenGL does not maintain this data as far as anyone knows, so it was hardcoded at 65536.

For reference on my home machine with a GF 6800 GT, the MaxPrimitiveCount is 1,048,575
on my work machine with ATI 9700 Pro, the MaxPrimitiveCount is also 1,048,575.

Posted: Tue Oct 04, 2005 6:58 pm
by Myth
Right, so... I just can't draw that object or have to split it up in 2? Aww..

Posted: Tue Oct 04, 2005 7:02 pm
by Spintz
Huh?

You can draw the object, change the engine so that the CVideoNull::getMaximalPrimitiveCount() returns something like 1,000,000. DirectX driver overrides this virtual function and returns the value from D3DCAPS as I mentioned before. OpenGL video driver has no way of determining this, so it just uses the default in CVideoNull, which as I've said, is waaaaaaay too low, especially for today's hardware.