From 9c97ec45c6c1032ac4c01e5745f26bb52d9ded2f Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 18 Oct 2017 00:21:07 +0200 Subject: [PATCH] Utility/Mesh: Disable index buffer optimization in debug mode --- include/Nazara/Utility/Mesh.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/Nazara/Utility/Mesh.hpp b/include/Nazara/Utility/Mesh.hpp index d3082b82f..cb0f8fdc6 100644 --- a/include/Nazara/Utility/Mesh.hpp +++ b/include/Nazara/Utility/Mesh.hpp @@ -35,7 +35,11 @@ namespace Nz Vector2f texCoordScale = {1.f, 1.f}; ///< Scale to apply on the texture coordinates bool animated = true; ///< If true, will load an animated version of the model if possible bool center = false; ///< If true, will center the mesh vertices around the origin + #ifndef NAZARA_DEBUG bool optimizeIndexBuffers = true; ///< Optimize the index buffers after loading, improve cache locality (and thus rendering speed) but increase loading time. + #else + bool optimizeIndexBuffers = false; ///< Since this optimization take a lot of time, especially in debug mode, don't enable it by default in debug. + #endif /* The declaration must have a Vector3f position component enabled * If the declaration has a Vector2f UV component enabled, UV are generated