Added trace log for data unloading

This commit is contained in:
Ray 2015-08-05 19:17:56 +02:00
parent 5436d93a3d
commit a42bfa7794
4 changed files with 14 additions and 0 deletions

View file

@ -449,6 +449,8 @@ void UnloadSound(Sound sound)
{ {
alDeleteSources(1, &sound.source); alDeleteSources(1, &sound.source);
alDeleteBuffers(1, &sound.buffer); alDeleteBuffers(1, &sound.buffer);
TraceLog(INFO, "Unloaded sound data");
} }
// Play a sound // Play a sound
@ -922,6 +924,8 @@ static Wave LoadOGG(char *fileName)
static void UnloadWave(Wave wave) static void UnloadWave(Wave wave)
{ {
free(wave.data); free(wave.data);
TraceLog(INFO, "Unloaded wave data");
} }
// Some required functions for audio standalone module version // Some required functions for audio standalone module version

View file

@ -1116,6 +1116,8 @@ void UnloadModel(Model model)
rlDeleteBuffers(model.mesh.vboId[2]); rlDeleteBuffers(model.mesh.vboId[2]);
rlDeleteVertexArrays(model.mesh.vaoId); rlDeleteVertexArrays(model.mesh.vaoId);
TraceLog(INFO, "Unloaded model data");
} }
// Link a texture to a model // Link a texture to a model

View file

@ -216,6 +216,8 @@ extern void UnloadDefaultFont(void)
{ {
UnloadTexture(defaultFont.texture); UnloadTexture(defaultFont.texture);
free(defaultFont.charSet); free(defaultFont.charSet);
TraceLog(INFO, "Unloaded default font data");
} }
// Get the default font, useful to be used with extended parameters // Get the default font, useful to be used with extended parameters
@ -266,6 +268,8 @@ void UnloadSpriteFont(SpriteFont spriteFont)
{ {
UnloadTexture(spriteFont.texture); UnloadTexture(spriteFont.texture);
free(spriteFont.charSet); free(spriteFont.charSet);
TraceLog(INFO, "Unloaded sprite font data");
} }
// Draw text (using default font) // Draw text (using default font)

View file

@ -390,12 +390,16 @@ Texture2D LoadTextureFromImage(Image image)
void UnloadImage(Image image) void UnloadImage(Image image)
{ {
free(image.data); free(image.data);
TraceLog(INFO, "Unloaded image data");
} }
// Unload texture from GPU memory // Unload texture from GPU memory
void UnloadTexture(Texture2D texture) void UnloadTexture(Texture2D texture)
{ {
rlDeleteTextures(texture.id); rlDeleteTextures(texture.id);
TraceLog(INFO, "[TEX ID %i] Unloaded texture data", texture.id);
} }
// Get pixel data from image in the form of Color struct array // Get pixel data from image in the form of Color struct array