I made piece of code to give my game a camera,
| SDL_RenderSetViewport(rend, &cam);
I used a viewport as a camera and made a rect as the position and dimensions for it. But everytime I move it to the left
and it gets to end of the left side of the window everything I have rendered disappears, but when I move it to the right
it moves to the left. I changed the starting x so it wouldn't start at 0, it fixed the inverted direction but when it reaches the left side everything still goes invisible.
I have only been using SDL 2 for 3 months now, so if anyone has any tips what's happening to the renderer, please post it.