diff --git a/SDL3/SDL_LockTexture.md b/SDL3/SDL_LockTexture.md index a9bcb7dd1..a099b82f1 100644 --- a/SDL3/SDL_LockTexture.md +++ b/SDL3/SDL_LockTexture.md @@ -40,6 +40,17 @@ application level. You must use [SDL_UnlockTexture](SDL_UnlockTexture)() to unlock the pixels and apply any changes. +*Note on SDL_LockTexture vs SDL_UpdateTexture:* +On the software renderer, you can write directly to the final destination +with SDL_LockTexture, whereas SDL_UpdateTexture will need to make a copy +from your buffer to SDL's. +On the other renderers, it's probably the same (the GLES2 renderer, for +example, literally just calls SDL_UpdateTexture for its SDL_UnlockTexture +implementation)... but if you ever need a software renderer, this is the +thing that would benefit most from texture locking. +But in real life, with actual GPUs, it doesn't really matter a whole lot. + + ## Thread Safety This function should only be called on the main thread.