Skip to content

Commit

Permalink
Merge pull request #1189 from KJ4ERJ/texture-memory-reporting
Browse files Browse the repository at this point in the history
Fix Texture Memory reporting
  • Loading branch information
seclorum authored Jul 20, 2017
2 parents 6604b53 + d4ed71b commit 0e3ff92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/moai-sim/MOAIGfxMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,15 @@ void MOAIGfxMgr::ReportTextureAlloc ( cc8* name, size_t size ) {

this->mTextureMemoryUsage += size;
float mb = ( float )this->mTextureMemoryUsage / 1024.0f / 1024.0f;
MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "+", size, mb, name );
MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "+", size/1024, mb, name );
}

//----------------------------------------------------------------//
void MOAIGfxMgr::ReportTextureFree ( cc8* name, size_t size ) {

this->mTextureMemoryUsage -= size;
float mb = ( float )this->mTextureMemoryUsage / 1024.0f / 1024.0f;
MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "-", size, mb, name );
MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "-", size/1024, mb, name );
}

//----------------------------------------------------------------//
Expand Down
2 changes: 1 addition & 1 deletion src/moai-sim/MOAISingleTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ bool MOAISingleTexture::CreateTextureFromImage ( MOAIImage& srcImage ) {
}
}

//MOAIGfxMgr::Get ().ReportTextureAlloc ( this->mDebugName, this->mTextureSize );
MOAIGfxMgr::Get ().ReportTextureAlloc ( this->mDebugName, this->mTextureSize );

return true;
}
Expand Down

0 comments on commit 0e3ff92

Please sign in to comment.