diff options
| author | jussi | 2022-05-25 23:17:13 +0300 |
|---|---|---|
| committer | jussi | 2022-05-25 23:17:13 +0300 |
| commit | 3aec701f80478e6d26f132486163b62451e3d0e9 (patch) | |
| tree | 633723c5800e3a86d02dc56b95e59e7776644ef9 /API.md | |
| parent | 06f99406824b8bb03db17029279a0d139808cf6c (diff) | |
| download | reilua-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.md | 116 |
1 files changed, 70 insertions, 46 deletions
@@ -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 --- |
