1<HTML 2><HEAD 3><TITLE 4>SDL_UpdateRects</TITLE 5><META 6NAME="GENERATOR" 7CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ 8"><LINK 9REL="HOME" 10TITLE="SDL Library Documentation" 11HREF="index.html"><LINK 12REL="UP" 13TITLE="Video" 14HREF="video.html"><LINK 15REL="PREVIOUS" 16TITLE="SDL_UpdateRect" 17HREF="sdlupdaterect.html"><LINK 18REL="NEXT" 19TITLE="SDL_Flip" 20HREF="sdlflip.html"></HEAD 21><BODY 22CLASS="REFENTRY" 23BGCOLOR="#FFF8DC" 24TEXT="#000000" 25LINK="#0000ee" 26VLINK="#551a8b" 27ALINK="#ff0000" 28><DIV 29CLASS="NAVHEADER" 30><TABLE 31SUMMARY="Header navigation table" 32WIDTH="100%" 33BORDER="0" 34CELLPADDING="0" 35CELLSPACING="0" 36><TR 37><TH 38COLSPAN="3" 39ALIGN="center" 40>SDL Library Documentation</TH 41></TR 42><TR 43><TD 44WIDTH="10%" 45ALIGN="left" 46VALIGN="bottom" 47><A 48HREF="sdlupdaterect.html" 49ACCESSKEY="P" 50>Prev</A 51></TD 52><TD 53WIDTH="80%" 54ALIGN="center" 55VALIGN="bottom" 56></TD 57><TD 58WIDTH="10%" 59ALIGN="right" 60VALIGN="bottom" 61><A 62HREF="sdlflip.html" 63ACCESSKEY="N" 64>Next</A 65></TD 66></TR 67></TABLE 68><HR 69ALIGN="LEFT" 70WIDTH="100%"></DIV 71><H1 72><A 73NAME="SDLUPDATERECTS" 74></A 75>SDL_UpdateRects</H1 76><DIV 77CLASS="REFNAMEDIV" 78><A 79NAME="AEN1392" 80></A 81><H2 82>Name</H2 83>SDL_UpdateRects -- Makes sure the given list of rectangles is updated on the given screen.</DIV 84><DIV 85CLASS="REFSYNOPSISDIV" 86><A 87NAME="AEN1395" 88></A 89><H2 90>Synopsis</H2 91><DIV 92CLASS="FUNCSYNOPSIS" 93><A 94NAME="AEN1396" 95></A 96><P 97></P 98><PRE 99CLASS="FUNCSYNOPSISINFO" 100>#include "SDL.h"</PRE 101><P 102><CODE 103><CODE 104CLASS="FUNCDEF" 105>void <B 106CLASS="FSFUNC" 107>SDL_UpdateRects</B 108></CODE 109>(SDL_Surface *screen, int numrects, SDL_Rect *rects);</CODE 110></P 111><P 112></P 113></DIV 114></DIV 115><DIV 116CLASS="REFSECT1" 117><A 118NAME="AEN1402" 119></A 120><H2 121>Description</H2 122><P 123>Makes sure the given list of rectangles is updated on the given screen. 124The rectangles must all be confined within the screen boundaries (no 125clipping is done).</P 126><P 127>This function should not be called while <TT 128CLASS="PARAMETER" 129><I 130>screen</I 131></TT 132> is 133<A 134HREF="sdllocksurface.html" 135>locked</A 136>.</P 137><DIV 138CLASS="NOTE" 139><BLOCKQUOTE 140CLASS="NOTE" 141><P 142><B 143>Note: </B 144>It is adviced to call this function only once per frame, since each 145call has some processing overhead. This is no restriction since you 146can pass any number of rectangles each time.</P 147><P 148>The rectangles are not automatically merged or checked for overlap. In 149general, the programmer can use his knowledge about his particular 150rectangles to merge them in an efficient way, to avoid overdraw.</P 151></BLOCKQUOTE 152></DIV 153></DIV 154><DIV 155CLASS="REFSECT1" 156><A 157NAME="AEN1411" 158></A 159><H2 160>See Also</H2 161><P 162><A 163HREF="sdlupdaterect.html" 164><TT 165CLASS="FUNCTION" 166>SDL_UpdateRect</TT 167></A 168>, 169<A 170HREF="sdlrect.html" 171><SPAN 172CLASS="STRUCTNAME" 173>SDL_Rect</SPAN 174></A 175>, 176<A 177HREF="sdlsurface.html" 178><SPAN 179CLASS="STRUCTNAME" 180>SDL_Surface</SPAN 181></A 182>, 183<A 184HREF="sdllocksurface.html" 185><TT 186CLASS="FUNCTION" 187>SDL_LockSurface</TT 188></A 189></P 190></DIV 191><DIV 192CLASS="NAVFOOTER" 193><HR 194ALIGN="LEFT" 195WIDTH="100%"><TABLE 196SUMMARY="Footer navigation table" 197WIDTH="100%" 198BORDER="0" 199CELLPADDING="0" 200CELLSPACING="0" 201><TR 202><TD 203WIDTH="33%" 204ALIGN="left" 205VALIGN="top" 206><A 207HREF="sdlupdaterect.html" 208ACCESSKEY="P" 209>Prev</A 210></TD 211><TD 212WIDTH="34%" 213ALIGN="center" 214VALIGN="top" 215><A 216HREF="index.html" 217ACCESSKEY="H" 218>Home</A 219></TD 220><TD 221WIDTH="33%" 222ALIGN="right" 223VALIGN="top" 224><A 225HREF="sdlflip.html" 226ACCESSKEY="N" 227>Next</A 228></TD 229></TR 230><TR 231><TD 232WIDTH="33%" 233ALIGN="left" 234VALIGN="top" 235>SDL_UpdateRect</TD 236><TD 237WIDTH="34%" 238ALIGN="center" 239VALIGN="top" 240><A 241HREF="video.html" 242ACCESSKEY="U" 243>Up</A 244></TD 245><TD 246WIDTH="33%" 247ALIGN="right" 248VALIGN="top" 249>SDL_Flip</TD 250></TR 251></TABLE 252></DIV 253></BODY 254></HTML 255>