mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 14:26:06 +02:00
Set default for MeshLoader IndexTypeHint to EITH_OPTIMAL.
Did some tests and the overhead speed cost on loading and rendering where both not really measurable even in a pretty huge scene. While some Irrlicht parts might still have a problem with 32-bit meshes (octree for example, also some meshmanipulator functions), it's probably still less of a problem than having broken meshes and just a nicer default. Also the troubling parts in Irrlicht can be improved over time. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6343 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -30,7 +30,7 @@ class IMeshLoader : public virtual IReferenceCounted
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
IMeshLoader() : TextureLoader(0), IndexTypeHint(EITH_16BIT) {}
|
||||
IMeshLoader() : TextureLoader(0), IndexTypeHint(EITH_OPTIMAL) {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~IMeshLoader()
|
||||
@ -82,21 +82,24 @@ public:
|
||||
enum E_INDEX_TYPE_HINT
|
||||
{
|
||||
//! Prefer to use 16-bit index buffers even if it breaks the mesh
|
||||
//! The default (and only option) before Irrlicht 1.9
|
||||
EITH_16BIT,
|
||||
|
||||
//! Allow using 32-bit index buffers
|
||||
EITH_32BIT,
|
||||
|
||||
//! Allow 32-bit, but copy back to 16-bit when 32 is not needed.
|
||||
//! So tiny overhead on loading, but meshes are later more optimal
|
||||
//! So tiny overhead (sometimes extra allocation+copying) on loading,
|
||||
//! but meshes are later more optimal.
|
||||
//! Default since Irrlicht 1.9
|
||||
EITH_OPTIMAL
|
||||
};
|
||||
|
||||
|
||||
//! Give loader a hint if you would prefer 16 or 32 bit meshbuffers.
|
||||
/**
|
||||
Generally Irrlicht works with 16-bit meshbuffers so far.
|
||||
Rendering 32-bit meshbuffers works, other functions like
|
||||
Before Irrlicht 1.9 Irrlicht worked mostly with 16-bit meshbuffers.
|
||||
Rendering 32-bit meshbuffers works, but some functions like
|
||||
mesh-writing and mesh manipulation might not work yet.
|
||||
NOTE: Most loaders will ignore this hint so far, but hopefully
|
||||
will care about it in the future.
|
||||
|
Reference in New Issue
Block a user