I’m a decently novice self taught programmer. I am really comfortable with c++ and have gotten to the point where I can make simple games with SDL 1.2. Recently I took the time to build the sdl2.0 libraries and have started using them. The question I have is how does the blitting work with render targets. I have never used any language that uses render targets as I haven’t taken the time to teach myself anything other then c++ and SDL 1.2. I have been following the migration guide wiki on this but still am unsure on how this is done. I’m not really interestedin playing with textures at the moment as I am trying to refamilerize myself with SDL and all the new things in SDL2 and would like to keep things simple.
Heres the way I would think it works.
SDL_Blit asks for 2 SDL_Rect and 2 SDL_Surface*. I understand how to load in the images to a surface and I understand what the 2 SDL_Rects are for, but am missing why it asks for a destination surface* when i would think it should ask for the renderer*.
So the way I understand this working is you prepare a surface to show then call the SDL_RenderPresent(SDL_Renderer*) function and it somehow knows the surface u want to show or is there a way that I need to tell the renderer to use the surface I have prepared to show.
Like I said for right now I just want to keep this simple with just showing images. I’ll fool around with textures at a latter time.