The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
[SDL2/Windows]-SDL_RenderSetClipRect() & Window Resizing
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
[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!
[SDL2/Windows]-SDL_RenderSetClipRect() & Window Resizing
Jonny D


Joined: 12 Sep 2009
Posts: 932
What happened when you tried it?

Jonny D




On Tue, Apr 21, 2015 at 3:11 PM, JeZ-l-Lee wrote:
Quote:
[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


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: [SDL2/Windows]-SDL_RenderSetClipRect() & Window Resi
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
Jonny D wrote:
What happened when you tried it?
Hi,

Seems to be working on a window resize.
So all is good!