aboutsummaryrefslogtreecommitdiff
path: root/examples/textures
diff options
context:
space:
mode:
authorRay San <raysan5@gmail.com>2018-05-04 16:59:48 +0200
committerRay San <raysan5@gmail.com>2018-05-04 16:59:48 +0200
commitec33e7d705e301eb2b74a841e823907295caa37a (patch)
tree7726a0d89a862b96cc91ec8a1ba18d07cf022c79 /examples/textures
parent6045062a05a0cc5bd654ad2c2e7d88f94579cd73 (diff)
downloadraylib-ec33e7d705e301eb2b74a841e823907295caa37a.tar.gz
raylib-ec33e7d705e301eb2b74a841e823907295caa37a.zip
BREAKING CHANGE: Renamed SpriteFont type to Font
- Preparing MP3 files support - Jumped version to raylib 2.0-dev (too many breaking changes...)
Diffstat (limited to 'examples/textures')
-rw-r--r--examples/textures/textures_image_drawing.c4
-rw-r--r--examples/textures/textures_image_text.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/textures/textures_image_drawing.c b/examples/textures/textures_image_drawing.c
index ac128af9..b179612d 100644
--- a/examples/textures/textures_image_drawing.c
+++ b/examples/textures/textures_image_drawing.c
@@ -38,12 +38,12 @@ int main()
UnloadImage(cat); // Unload image from RAM
// Load custom font for frawing on image
- SpriteFont font = LoadSpriteFont("resources/custom_jupiter_crash.png");
+ Font font = LoadFont("resources/custom_jupiter_crash.png");
// Draw over image using custom font
ImageDrawTextEx(&parrots, (Vector2){ 300, 230 }, font, "PARROTS & CAT", font.baseSize, -2, WHITE);
- UnloadSpriteFont(font); // Unload custom spritefont (already drawn used on image)
+ UnloadFont(font); // Unload custom spritefont (already drawn used on image)
Texture2D texture = LoadTextureFromImage(parrots); // Image converted to texture, uploaded to GPU memory (VRAM)
UnloadImage(parrots); // Once image has been converted to texture and uploaded to VRAM, it can be unloaded from RAM
diff --git a/examples/textures/textures_image_text.c b/examples/textures/textures_image_text.c
index 1d4231f7..0a939b8d 100644
--- a/examples/textures/textures_image_text.c
+++ b/examples/textures/textures_image_text.c
@@ -20,8 +20,8 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [texture] example - image text drawing");
- // TTF SpriteFont loading with custom generation parameters
- SpriteFont font = LoadSpriteFontEx("resources/KAISG.ttf", 64, 0, 0);
+ // TTF Font loading with custom generation parameters
+ Font font = LoadFontEx("resources/KAISG.ttf", 64, 0, 0);
Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM)
@@ -74,7 +74,7 @@ int main()
//--------------------------------------------------------------------------------------
UnloadTexture(texture); // Texture unloading
- UnloadSpriteFont(font); // Unload custom spritefont
+ UnloadFont(font); // Unload custom spritefont
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------