[SDL2/Windows]-SDL_RenderSetClipRect() & Window Resizing?

[SDL2/Windows]-SDL_RenderSetClipRect() & Window Resizing?

Hi,

We are working on converting our word game from SDL1 to SDL2.
We are now in the process of adding “Dirty Rectangle” drawing optimization to it.
(needed to improve game speed on old Windows XP computers which we decided to support)

SDL_RenderSetClipRect() seems to be the command we need.
But what happens when the game’s window is resized?
Do we need to recalculate the SDL_Rect based on the new size of the game’s window?

Thanks!------------------------
JeZxLee
JessePalser <AT> GMail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com

What happened when you tried it?

Jonny DOn Tue, Apr 21, 2015 at 3:11 PM, JeZ-l-Lee < JessePalserMailingLists at gmail.com> wrote:

[SDL2/Windows]-SDL_RenderSetClipRect() & Window Resizing?

Hi,

We are working on converting our word game from SDL1 to SDL2.
We are now in the process of adding “Dirty Rectangle” drawing optimization
to it.
(needed to improve game speed on old Windows XP computers which we decided
to support)

SDL_RenderSetClipRect() seems to be the command we need.
But what happens when the game’s window is resized?
Do we need to recalculate the SDL_Rect based on the new size of the game’s
window?

Thanks!


JeZxLee
JessePalser GMail com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Jonny D wrote:

What happened when you tried it?
Hi,

Seems to be working on a window resize.
So all is good!------------------------
JeZxLee
JessePalser <AT> GMail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com