diff options
| author | Ray <[email protected]> | 2021-06-28 12:15:19 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-06-28 12:15:19 +0200 |
| commit | 7e57cdf8ad704dac6bdce051bdb9e718d83ea703 (patch) | |
| tree | a5a5784821baf349b0c14ffb62a049c6bc09e9b7 /examples | |
| parent | 790cbb4d0fbaffc71bf5439de40bb3e44b6658db (diff) | |
| download | raylib.com-7e57cdf8ad704dac6bdce051bdb9e718d83ea703.tar.gz raylib.com-7e57cdf8ad704dac6bdce051bdb9e718d83ea703.zip | |
Review function names
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/web/textures/textures_mouse_painting.c | 2 | ||||
| -rw-r--r-- | examples/web/textures/textures_to_image.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/web/textures/textures_mouse_painting.c b/examples/web/textures/textures_mouse_painting.c index b363e4a..0773bee 100644 --- a/examples/web/textures/textures_mouse_painting.c +++ b/examples/web/textures/textures_mouse_painting.c @@ -177,7 +177,7 @@ void UpdateDrawFrame(void) // NOTE: Saving painted texture to a default named image if ((btnSaveMouseHover && IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) || 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/web/textures/textures_to_image.c b/examples/web/textures/textures_to_image.c index 5ba19e8..726203a 100644 --- a/examples/web/textures/textures_to_image.c +++ b/examples/web/textures/textures_to_image.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib [core] example - Retrieve image data from texture: GetTextureData() (adapted for HTML5 platform) +* raylib [core] example - Retrieve image data from texture: LoadImageFromTexture() (adapted for HTML5 platform) * * NOTE: Images are loaded in CPU memory (RAM); textures are loaded in GPU memory (VRAM) * @@ -46,7 +46,7 @@ int main(void) 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) |
