I have a texture created with
SDL_TEXTUREACCESS_TARGET access and I want to get all its pixels with
SDL_RenderReadPixels() function. One of the function parameters is
pitch and I don't really know where can I can get it.
Texture is created with dimensions of a previously created surface, but function call with
surface->pitch as pitch parameter generates
Texture and surface dimensions are 800x600, and
surface->pitch returns 3200, which is strange for me, because I thought that pitch is the width of the texture in memory and expected
surface->pitch to be something like 1024.