Added some comments to examples

This commit is contained in:
raysan5 2015-09-01 22:59:16 +02:00
parent e93475d854
commit e5fe2c216e
11 changed files with 21 additions and 15 deletions

View file

@ -35,6 +35,7 @@ int main()
int width = 1024;
int height = 1024;
// Dynamic memory allocation to store pixels data (Color type)
Color *pixels = (Color *)malloc(width*height*sizeof(Color));
for (int y = 0; y < height; y++)
@ -50,6 +51,8 @@ int main()
Image checkedIm = LoadImageEx(pixels, width, height);
Texture2D checked = LoadTextureFromImage(checkedIm);
UnloadImage(checkedIm); // Unload CPU (RAM) image data
// Dynamic memory must be freed after using it
free(pixels); // Unload CPU (RAM) pixels data
//---------------------------------------------------------------------------------------