From 5592c02b28bc55f810f1cf05b703eac02a103870 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 14 Jan 2013 21:59:56 +0100 Subject: [PATCH] [DEV] remove multiple acess load of mesh object element --- sources/ewol/renderer/ResourceManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/ewol/renderer/ResourceManager.cpp b/sources/ewol/renderer/ResourceManager.cpp index f68f553c..4f3b55e0 100644 --- a/sources/ewol/renderer/ResourceManager.cpp +++ b/sources/ewol/renderer/ResourceManager.cpp @@ -322,7 +322,10 @@ bool ewol::resource::Keep(etk::UString& filename, ewol::TextureFile*& object, iv bool ewol::resource::Keep(etk::UString& filename, ewol::MeshObj*& object) { - // this element create a new one every time .... + object = static_cast(LocalKeep(filename)); + if (NULL != object) { + return true; + } object = new ewol::MeshObj(filename); if (NULL == object) { EWOL_ERROR("allocation error of a resource : ??Mesh.obj??");