I've been trying to learn how to use the SDL library with C (not C++) and recently discovered that the reason for all the errors I was getting was that I was looking at an SDL1 tutorial, not an SDL2 tutorial. I've since discovered that SDL2 has implemented a number of layers of abstraction absent (as far as I know) from SDL1 which appear to be impossible to bypass.
Specifically, whereas in SDL1, drawing a set of pixels on the screen was accomplished by:
define surface - find rgb values for pixels - draw pixels on surface - draw surface on screen
in SDL2 it appears to instead by done by:
define window - create renderer for window - create surface - find rgb values for pixels - draw pixels to surface - convert surface to texture - send texture to renderer - redraw window
While I understand how textures can be a simpler way to do things if there are things other than raw pixel data involved, especially if there are multiple sources for the data, in the specific case I want to use it for (a single window program in which raw pixel data is the only thing that will ever be drawn) the distinction between the window, renderer and texture is just pointless abstraction. Additionally, it seems that in most cases data from images will be loaded to the SDL_Surface class which must then be converted to a texture, adding even more unnecessary abstraction.
Is there any way to circumvent this aside from reverting to an older version of SDL?