sdlUnlockTexture function

void sdlUnlockTexture(
  1. Pointer<SdlTexture> texture
)

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

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.

\param texture a texture locked by SDL_LockTexture()

\since This function is available since SDL 2.0.0.

\sa SDL_LockTexture

extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture)

Implementation

void sdlUnlockTexture(Pointer<SdlTexture> texture) {
  final sdlUnlockTextureLookupFunction = libSdl2.lookupFunction<
      Void Function(Pointer<SdlTexture> texture),
      void Function(Pointer<SdlTexture> texture)>('SDL_UnlockTexture');
  return sdlUnlockTextureLookupFunction(texture);
}