The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Confusion regarding SDL_LockTexture
rbanke


Joined: 16 Sep 2013
Posts: 2
Hello, I think I am misunderstanding SDL_LockTexture's rect parameter. When passing a rect which is a sub-size of the entire texture, is pixels still meant to contain all the pixels of the texture? When I pass a rect I see no difference from passing NULL. The wiki says pixels should be offset by the locked area (the rect I'm assuming), but the results seem to conflict with the description. Am I just misunderstanding how this parameter is meant to work?