[DEV] update at the new resource definition methode

This commit is contained in:
Edouard DUPIN 2013-09-06 21:31:02 +02:00
parent 274ad28f95
commit 48099a92bb
2 changed files with 5 additions and 8 deletions

View File

@ -64,10 +64,7 @@ ege::ElementGame::~ElementGame(void)
// same ... // same ...
DynamicDisable(); DynamicDisable();
RemoveShape(); RemoveShape();
if (NULL != m_mesh) { ewol::Mesh::Release(m_mesh);
// release the mesh
ewol::resource::Release(m_mesh);
}
if (NULL != m_body) { if (NULL != m_body) {
delete(m_body); delete(m_body);
m_body = NULL; m_body = NULL;
@ -107,7 +104,7 @@ void ege::ElementGame::FunctionFreeShape(void* _pointer)
bool ege::ElementGame::LoadMesh(const etk::UString& _meshFileName) bool ege::ElementGame::LoadMesh(const etk::UString& _meshFileName)
{ {
ewol::Mesh* tmpMesh=NULL; ewol::Mesh* tmpMesh=NULL;
ewol::resource::Keep(_meshFileName, tmpMesh); tmpMesh = ewol::Mesh::Keep(_meshFileName);
if(NULL==tmpMesh) { if(NULL==tmpMesh) {
EGE_ERROR("can not load the resources : " << _meshFileName); EGE_ERROR("can not load the resources : " << _meshFileName);
return false; return false;
@ -119,7 +116,7 @@ bool ege::ElementGame::SetMesh(ewol::Mesh* _mesh)
{ {
if (NULL!=m_mesh) { if (NULL!=m_mesh) {
RemoveShape(); RemoveShape();
ewol::resource::Release(m_mesh); ewol::Mesh::Release(m_mesh);
} }
m_mesh = _mesh; m_mesh = _mesh;
// auto load the shape : // auto load the shape :

View File

@ -51,7 +51,7 @@ ege::Scene::Scene(bool _setAutoBullet, bool _setAutoCamera) :
AddEventId(eventPlayTimeChange); AddEventId(eventPlayTimeChange);
AddEventId(eventKillEnemy); AddEventId(eventKillEnemy);
ewol::resource::Keep(m_debugDrawing); m_debugDrawing = ewol::Colored3DObject::Keep();
m_ratioTime = 1.0f; m_ratioTime = 1.0f;
if (_setAutoBullet==true) { if (_setAutoBullet==true) {
@ -117,7 +117,7 @@ void ege::Scene::SetCamera(ege::Camera* _camera)
ege::Scene::~Scene(void) ege::Scene::~Scene(void)
{ {
ewol::resource::Release(m_debugDrawing); ewol::Colored3DObject::Release(m_debugDrawing);
/* /*
ewol::resource::Release(m_directDrawObject); ewol::resource::Release(m_directDrawObject);
//cleanup in the reverse order of creation/initialization //cleanup in the reverse order of creation/initialization