Aeva / m.grl

Midnight Graphics & Recreation Library
http://mgrl.midnightsisters.org
GNU Lesser General Public License v3.0
44 stars 3 forks source link

Automatically split apart IBOs when 'OES_element_index_uint' is unavailable #32

Open Aeva opened 9 years ago

Aeva commented 9 years ago

Upon loading a scene, if a object's IBO is too long, consider automatically splitting it apart until it isn't.

This is low priority until I encounter a desktop / laptop that doesn't support the required extension. Older mobile devices sometimes lack support for this.

It might be better to have the Blender exporter avoid using 32bit element indices, in favor of using only 16bit element indices. This may call for a small change in how the file format works if both IBOs are able to use the same VBO.

On the other hand, it may be better to have Blender automatically export using the smallest type able to capture everything in the model, and then have M.GRL coerce it into whatever form it is able to render (for example, unit8 would need to be cast up to the uint16 I thiiiiiink contingent on an extension being available, and uint32 definitely needs an extension that is often missing on mobile devices).

I think the later option is generally preferable.

Aeva commented 9 years ago

Moving this to milestone 2, as it is a somewhat non-trivial edge case for mobile devices.