Question about SDL_Rect scope.
Say I have a member function like so.
void drawRect(int x, int y, int w, int y) {
SDL_Rect r = {x, y, w, h};
SDL_RenderDrawRect(m_renderer, &r);
}
Will it cause problems if SDL_Rect goes out of scope before calling SDL_RenderPresent?
I cannot tell if the values are copied from SDL_Rect when calling SDL_RenderDrawRect or if internally SDL is storing the pointer until SDL_RenderPresent is called.
Thanks!