summaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorjussi2022-05-25 23:17:13 +0300
committerjussi2022-05-25 23:17:13 +0300
commit3aec701f80478e6d26f132486163b62451e3d0e9 (patch)
tree633723c5800e3a86d02dc56b95e59e7776644ef9 /API.md
parent06f99406824b8bb03db17029279a0d139808cf6c (diff)
downloadreilua-enhanced-3aec701f80478e6d26f132486163b62451e3d0e9.tar.gz
reilua-enhanced-3aec701f80478e6d26f132486163b62451e3d0e9.tar.bz2
reilua-enhanced-3aec701f80478e6d26f132486163b62451e3d0e9.zip
Texture update functions.
Diffstat (limited to 'API.md')
-rw-r--r--API.md116
1 files changed, 70 insertions, 46 deletions
diff --git a/API.md b/API.md
index e5528cd..d2ead49 100644
--- a/API.md
+++ b/API.md
@@ -2123,7 +2123,7 @@ Get collision rectangle for two rectangles collision
---
-## Textures - Load
+## Textures - Image Loading
---
@@ -2180,51 +2180,6 @@ Export image as code file defining an array of bytes, returns true on success
---
-> texture = RL_LoadTexture( string fileName )
-
-Load texture from file into GPU memory ( VRAM )
-
-- Failure return -1
-- Success return int
-
----
-
-> texture = RL_LoadTextureFromImage( Image image )
-
-Load texture from image data
-
-- Failure return -1
-- Success return int
-
----
-
-> success = RL_UnloadTexture( Texture2D texture )
-
-Unload texture from GPU memory ( VRAM )
-
-- Failure return false
-- Success return true
-
----
-
-> renderTexture = RL_LoadRenderTexture( Vector2 size )
-
-Load texture for rendering ( framebuffer )
-
-- Failure return -1
-- Success return int
-
----
-
-> success = RL_UnloadRenderTexture( RenderTexture2D target )
-
-Unload render texture from GPU memory ( VRAM )
-
-- Failure return false
-- Success return true
-
----
-
## Textures - Image Generation
---
@@ -2664,6 +2619,75 @@ Get image data format ( PixelFormat type )
---
+## Textures - Texture Loading
+
+---
+
+> texture = RL_LoadTexture( string fileName )
+
+Load texture from file into GPU memory ( VRAM )
+
+- Failure return -1
+- Success return int
+
+---
+
+> texture = RL_LoadTextureFromImage( Image image )
+
+Load texture from image data
+
+- Failure return -1
+- Success return int
+
+---
+
+> success = RL_UnloadTexture( Texture2D texture )
+
+Unload texture from GPU memory ( VRAM )
+
+- Failure return false
+- Success return true
+
+---
+
+> renderTexture = RL_LoadRenderTexture( Vector2 size )
+
+Load texture for rendering ( framebuffer )
+
+- Failure return -1
+- Success return int
+
+---
+
+> success = RL_UnloadRenderTexture( RenderTexture2D target )
+
+Unload render texture from GPU memory ( VRAM )
+
+- Failure return false
+- Success return true
+
+---
+
+> success = RL_UpdateTexture( Texture2D texture, int pixels{ {} } )
+
+Update GPU texture with new data
+NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format
+
+- Failure return false
+- Success return true
+
+---
+
+> success = RL_UpdateTextureRec( Texture2D texture, Rectangle rec, int pixels{ {} } )
+
+Update GPU texture rectangle with new data
+NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format
+
+- Failure return false
+- Success return true
+
+---
+
## Textures - Texture Drawing
---