summaryrefslogtreecommitdiffhomepage
path: root/examples/textures
diff options
context:
space:
mode:
authorRay <[email protected]>2021-06-28 09:39:31 +0200
committerRay <[email protected]>2021-06-28 09:39:31 +0200
commite5cf3f9555bc8b0d6e379c4fae95358049a1b37c (patch)
treea0a3da3d23e4c9124c4aa703513552d073a83c11 /examples/textures
parent5f03201616e32b04d969e8c4f2918f17df5447b6 (diff)
downloadraylib-e5cf3f9555bc8b0d6e379c4fae95358049a1b37c.tar.gz
raylib-e5cf3f9555bc8b0d6e379c4fae95358049a1b37c.zip
WARNING: BREAKING: Functions renamed for consistency
RENAMED: GetTextureData() -> LoadImageFromTexture() RENAMED: GetScreenData() -> LoadImageFromScreen()
Diffstat (limited to 'examples/textures')
-rw-r--r--examples/textures/textures_mouse_painting.c2
-rw-r--r--examples/textures/textures_to_image.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/textures/textures_mouse_painting.c b/examples/textures/textures_mouse_painting.c
index 3001e853..3d6fdf10 100644
--- a/examples/textures/textures_mouse_painting.c
+++ b/examples/textures/textures_mouse_painting.c
@@ -146,7 +146,7 @@ int main(void)
// NOTE: Saving painted texture to a default named image
if ((btnSaveMouseHover && IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) || IsKeyPressed(KEY_S))
{
- Image image = GetTextureData(target.texture);
+ Image image = LoadImageFromTexture(target.texture);
ImageFlipVertical(&image);
ExportImage(image, "my_amazing_texture_painting.png");
UnloadImage(image);
diff --git a/examples/textures/textures_to_image.c b/examples/textures/textures_to_image.c
index c0989baf..fc595b99 100644
--- a/examples/textures/textures_to_image.c
+++ b/examples/textures/textures_to_image.c
@@ -1,6 +1,6 @@
/*******************************************************************************************
*
-* raylib [textures] example - Retrieve image data from texture: GetTextureData()
+* raylib [textures] example - Retrieve image data from texture: LoadImageFromTexture()
*
* NOTE: Images are loaded in CPU memory (RAM); textures are loaded in GPU memory (VRAM)
*
@@ -28,7 +28,7 @@ int main(void)
Texture2D texture = LoadTextureFromImage(image); // Image converted to texture, GPU memory (RAM -> VRAM)
UnloadImage(image); // Unload image data from CPU memory (RAM)
- image = GetTextureData(texture); // Retrieve image data from GPU memory (VRAM -> RAM)
+ image = LoadImageFromTexture(texture); // Load image from GPU texture (VRAM -> RAM)
UnloadTexture(texture); // Unload texture from GPU memory (VRAM)
texture = LoadTextureFromImage(image); // Recreate texture from retrieved image data (RAM -> VRAM)