Overflow Error


19-08-2007 06:37:18

I am receiving the following error while trying to create a manual object.
OverflowError: bad numeric conversion: positive overflow
This error only happens when the index values I use for the shortcut quad function are in excess of 65535. I recognize this as a integer value of some reserved limitation. After a small bit of googling, I tracked down my error to that of a boost concern.

http://www.boost.org/libs/numeric/conve ... es.html#oh

I'm going to go out on a limb and assume that python-ogre is binding my standard python int passes in some restricted range for memory concerns. Is there any quick solution to working around this limitation?


19-08-2007 11:04:29

Nope, a ManualObject only supports 16-bit indexes, (indexes are uint16 i.e. unsigned integers range from 0 to 65535).
From API:

32-bit indexes are not supported on all cards which is why this class only
allows 16-bit indexes, for simplicity and ease of use.

http://www.ogre3d.org/docs/api/html/cla ... lObjecta20
http://www.ogre3d.org/phpBB2/viewtopic. ... it+indexes


20-08-2007 00:05:01

Much appreciated. This is good to know. I could divide up my manual object into several chunks then combine them in some haphazard manner. More than likely though, I'll end up trying to generate a mesh (fin mesh from edges) outside of Ogre. Since Manual Object seems to have some overhead from Sinbad's comments, this would save be a more beneficial solution -- meaning I wouldn't need to keep the edge mesh on my original model either.

Thanks for the answer, dermont.