Trying to load the Stanford dragon res3 (converted to obj) happily loads the 150k index file to a u16 buffer and claims it's EIT_16BIT.
I'd expect either an error, an automatic splitting to 65k meshbuffers, or automatic moving to 32bit indices.
[no bug]OBJ loader doesn't check index count
Re: OBJ loader doesn't check index count
I think there's some console-warning, but I agree that this is maybe not enough.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: OBJ loader doesn't check index count
No warnings, but looks correct here and only seems to have around 23000 vertices. So I don' t think it needs a larger buffer.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: OBJ loader doesn't check index count
edit: That's correct, but the index count is huge, near 150k.
edit2: Heh, I'm failing completely here aren't I? Somehow mixed things up and thought it meant the indices were also limited.
edit2: Heh, I'm failing completely here aren't I? Somehow mixed things up and thought it meant the indices were also limited.
Re: OBJ loader doesn't check index count
Yeah, can be confusing at times :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: [no bug]OBJ loader doesn't check index count
Hm, even though I didn't see the bug, wouldn't it still exist if I were to load an OBJ file with over 65k verts?
On a quick glance I couldn't find any such checks in the OBJ loader code.
On a quick glance I couldn't find any such checks in the OBJ loader code.
Re: [no bug]OBJ loader doesn't check index count
Well, all the OBJs I load have groups and materials. Every group+material is assigned to a new buffer.
I suppose all your OBJs are just grey.
I suppose all your OBJs are just grey.
Re: [no bug]OBJ loader doesn't check index count
Not sure right now where the check is - I only remember getting console warnings when loading .obj files with more than 65k vertices. Probably the check is somewhere in the mesh itself. Automatically using 32-bit indices instead would certainly be a nicer feature, but I think no-one has implemented that so far.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: [no bug]OBJ loader doesn't check index count
No, the check is in the driver upon rendering.