logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_UnlockTexture - Unlock a texture, uploading the changes to video memory, if needed.

Availability

       This function is available since SDL 3.2.0.

Description

Warning:  Please  note  that  SDL_LockTexture()  is  intended to be write-only; it will not guarantee the
       previous contents of the texture will be provided. You must fully initialize any area of a  texture  that
       you lock before unlocking it, as the pixels might otherwise be uninitialized memory.

       Which  is to say: locking and immediately unlocking a texture can result in corrupted textures, depending
       on the renderer in use.

Function Parameters

texture
              a texture locked by SDL_LockTexture().

Name

       SDL_UnlockTexture - Unlock a texture, uploading the changes to video memory, if needed.

See Also

SDL_LockTexture(3)

Simple Directmedia Layer                           SDL 3.2.20                               SDL_UnlockTexture(3)

Synopsis

#include<SDL3/SDL_render.h>voidSDL_UnlockTexture(SDL_Texture*texture);

Thread Safety

       This function should only be called on the main thread.

See Also