When I was storing the screen as an SDL_Surface, I could multiply colors to it like so:
Uint32 *pixels = (Uint32 *)screen->pixels;
unsigned int x, y;
for(y=0;y<screen->h;y++) {
for(x=0;x<screen->w;x++) {
// Code to edit each pixel here.
}
}
I am migrating my code to work with SDL_Textures again, which requires using an SDL_Renderer. I am familiar with using SDL_RenderCopy and all of those functions, but I'm not sure how to go about editing the individual pixels rendered to an SDL_Renderer, and this is necessary. Does anyone have any suggestions on how to do this? Thanks!