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);
alDeleteBuffers(1, &sound.buffer);
TraceLog(INFO, "Unloaded sound data");
}
// Play a sound
@ -922,6 +924,8 @@ static Wave LoadOGG(char *fileName)
static void UnloadWave(Wave wave)
{
free(wave.data);
TraceLog(INFO, "Unloaded wave data");
}
// Some required functions for audio standalone module version

View File

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

View File

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

View File

@ -390,12 +390,16 @@ Texture2D LoadTextureFromImage(Image image)
void UnloadImage(Image image)
{
free(image.data);
TraceLog(INFO, "Unloaded image data");
}
// Unload texture from GPU memory
void UnloadTexture(Texture2D texture)
{
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