Mercurial > sdl-ios-xcode
annotate docs/html/sdlsetvideomode.html @ 107:01fcac5d146e
Fixed crash in testsprite when using the -fast option (nobody caught this?)
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Fri, 13 Jul 2001 10:20:43 +0000 |
parents | 55f1f1b3e27d |
children | e5bc29de3f0a |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_SetVideoMode</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="Video" | |
14 HREF="video.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_VideoModeOK" | |
17 HREF="sdlvideomodeok.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_UpdateRect" | |
20 HREF="sdlupdaterect.html"></HEAD | |
21 ><BODY | |
22 CLASS="REFENTRY" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
31 WIDTH="100%" | |
32 BORDER="0" | |
33 CELLPADDING="0" | |
34 CELLSPACING="0" | |
35 ><TR | |
36 ><TH | |
37 COLSPAN="3" | |
38 ALIGN="center" | |
39 >SDL Library Documentation</TH | |
40 ></TR | |
41 ><TR | |
42 ><TD | |
43 WIDTH="10%" | |
44 ALIGN="left" | |
45 VALIGN="bottom" | |
46 ><A | |
47 HREF="sdlvideomodeok.html" | |
48 >Prev</A | |
49 ></TD | |
50 ><TD | |
51 WIDTH="80%" | |
52 ALIGN="center" | |
53 VALIGN="bottom" | |
54 ></TD | |
55 ><TD | |
56 WIDTH="10%" | |
57 ALIGN="right" | |
58 VALIGN="bottom" | |
59 ><A | |
60 HREF="sdlupdaterect.html" | |
61 >Next</A | |
62 ></TD | |
63 ></TR | |
64 ></TABLE | |
65 ><HR | |
66 ALIGN="LEFT" | |
67 WIDTH="100%"></DIV | |
68 ><H1 | |
69 ><A | |
70 NAME="SDLSETVIDEOMODE" | |
71 >SDL_SetVideoMode</A | |
72 ></H1 | |
73 ><DIV | |
74 CLASS="REFNAMEDIV" | |
75 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
76 NAME="AEN834" |
0 | 77 ></A |
78 ><H2 | |
79 >Name</H2 | |
80 >SDL_SetVideoMode -- Set up a video mode with the specified width, height and bits-per-pixel.</DIV | |
81 ><DIV | |
82 CLASS="REFSYNOPSISDIV" | |
83 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
84 NAME="AEN837" |
0 | 85 ></A |
86 ><H2 | |
87 >Synopsis</H2 | |
88 ><DIV | |
89 CLASS="FUNCSYNOPSIS" | |
90 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
91 NAME="AEN838" |
0 | 92 ></A |
93 ><P | |
94 ></P | |
95 ><PRE | |
96 CLASS="FUNCSYNOPSISINFO" | |
97 >#include "SDL.h"</PRE | |
98 ><P | |
99 ><CODE | |
100 ><CODE | |
101 CLASS="FUNCDEF" | |
102 >SDL_Surface *<B | |
103 CLASS="FSFUNC" | |
104 >SDL_SetVideoMode</B | |
105 ></CODE | |
106 >(int width, int height, int bpp, Uint32 flags);</CODE | |
107 ></P | |
108 ><P | |
109 ></P | |
110 ></DIV | |
111 ></DIV | |
112 ><DIV | |
113 CLASS="REFSECT1" | |
114 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
115 NAME="AEN844" |
0 | 116 ></A |
117 ><H2 | |
118 >Description</H2 | |
119 ><P | |
120 >Set up a video mode with the specified width, height and bits-per-pixel.</P | |
121 ><P | |
122 >If <TT | |
123 CLASS="PARAMETER" | |
124 ><I | |
125 >bpp</I | |
126 ></TT | |
127 > is 0, it is treated as the | |
128 current display bits per pixel.</P | |
129 ><P | |
130 >The <TT | |
131 CLASS="PARAMETER" | |
132 ><I | |
133 >flags</I | |
134 ></TT | |
135 > parameter is the same as the <TT | |
136 CLASS="STRUCTFIELD" | |
137 ><I | |
138 >flags</I | |
139 ></TT | |
140 > field of the <A | |
141 HREF="sdlsurface.html" | |
142 ><SPAN | |
143 CLASS="STRUCTNAME" | |
144 >SDL_Surface</SPAN | |
145 ></A | |
146 > structure. OR'd combinations of the following values are valid.</P | |
147 ><DIV | |
148 CLASS="INFORMALTABLE" | |
149 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
150 NAME="AEN854" |
0 | 151 ></A |
152 ><P | |
153 ></P | |
154 ><TABLE | |
155 BORDER="1" | |
156 CLASS="CALSTABLE" | |
157 ><TBODY | |
158 ><TR | |
159 ><TD | |
160 ALIGN="LEFT" | |
161 VALIGN="TOP" | |
162 ><TT | |
163 CLASS="LITERAL" | |
164 >SDL_SWSURFACE</TT | |
165 ></TD | |
166 ><TD | |
167 ALIGN="LEFT" | |
168 VALIGN="TOP" | |
169 >Create the video surface in system memory</TD | |
170 ></TR | |
171 ><TR | |
172 ><TD | |
173 ALIGN="LEFT" | |
174 VALIGN="TOP" | |
175 ><TT | |
176 CLASS="LITERAL" | |
177 >SDL_HWSURFACE</TT | |
178 ></TD | |
179 ><TD | |
180 ALIGN="LEFT" | |
181 VALIGN="TOP" | |
182 >Create the video surface in video memory</TD | |
183 ></TR | |
184 ><TR | |
185 ><TD | |
186 ALIGN="LEFT" | |
187 VALIGN="TOP" | |
188 ><TT | |
189 CLASS="LITERAL" | |
190 >SDL_ASYNCBLIT</TT | |
191 ></TD | |
192 ><TD | |
193 ALIGN="LEFT" | |
194 VALIGN="TOP" | |
195 >Enables the use of asynchronous to the display surface. This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems.</TD | |
196 ></TR | |
197 ><TR | |
198 ><TD | |
199 ALIGN="LEFT" | |
200 VALIGN="TOP" | |
201 ><TT | |
202 CLASS="LITERAL" | |
203 >SDL_ANYFORMAT</TT | |
204 ></TD | |
205 ><TD | |
206 ALIGN="LEFT" | |
207 VALIGN="TOP" | |
208 >Normally, if a video surface of the requested depth (<TT | |
209 CLASS="PARAMETER" | |
210 ><I | |
211 >bpp</I | |
212 ></TT | |
213 >) is not available, SDL will emulate one with a shadow surface. Passing <TT | |
214 CLASS="LITERAL" | |
215 >SDL_ANYFORMAT</TT | |
216 > prevents this and causes SDL to use the video surface, regardless of its depth.</TD | |
217 ></TR | |
218 ><TR | |
219 ><TD | |
220 ALIGN="LEFT" | |
221 VALIGN="TOP" | |
222 ><TT | |
223 CLASS="LITERAL" | |
224 >SDL_HWPALETTE</TT | |
225 ></TD | |
226 ><TD | |
227 ALIGN="LEFT" | |
228 VALIGN="TOP" | |
229 >Give SDL exclusive palette access. Without this flag you may not always get the the colors you request with <A | |
230 HREF="sdlsetcolors.html" | |
231 ><TT | |
232 CLASS="FUNCTION" | |
233 >SDL_SetColors</TT | |
234 ></A | |
235 >.</TD | |
236 ></TR | |
237 ><TR | |
238 ><TD | |
239 ALIGN="LEFT" | |
240 VALIGN="TOP" | |
241 ><TT | |
242 CLASS="LITERAL" | |
243 >SDL_DOUBLEBUF</TT | |
244 ></TD | |
245 ><TD | |
246 ALIGN="LEFT" | |
247 VALIGN="TOP" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
248 >Enable double buffering; only valid with SDL_HWSURFACE. Calling <A |
0 | 249 HREF="sdlflip.html" |
250 ><TT | |
251 CLASS="FUNCTION" | |
252 >SDL_Flip</TT | |
253 ></A | |
254 > will flip the buffers and update the screen. If double buffering could not be enabled then <TT | |
255 CLASS="FUNCTION" | |
256 >SDL_Flip</TT | |
257 > will just perform a <A | |
258 HREF="sdlupdaterect.html" | |
259 ><TT | |
260 CLASS="FUNCTION" | |
261 >SDL_UpdateRect</TT | |
262 ></A | |
263 > on the entire screen.</TD | |
264 ></TR | |
265 ><TR | |
266 ><TD | |
267 ALIGN="LEFT" | |
268 VALIGN="TOP" | |
269 ><TT | |
270 CLASS="LITERAL" | |
271 >SDL_FULLSCREEN</TT | |
272 ></TD | |
273 ><TD | |
274 ALIGN="LEFT" | |
275 VALIGN="TOP" | |
276 >SDL will attempt to use a fullscreen mode</TD | |
277 ></TR | |
278 ><TR | |
279 ><TD | |
280 ALIGN="LEFT" | |
281 VALIGN="TOP" | |
282 ><TT | |
283 CLASS="LITERAL" | |
284 >SDL_OPENGL</TT | |
285 ></TD | |
286 ><TD | |
287 ALIGN="LEFT" | |
288 VALIGN="TOP" | |
289 >Create an OpenGL rendering context. You should have previously set OpenGL video attributes with <A | |
290 HREF="sdlglsetattribute.html" | |
291 ><TT | |
292 CLASS="FUNCTION" | |
293 >SDL_GL_SetAttribute</TT | |
294 ></A | |
295 >.</TD | |
296 ></TR | |
297 ><TR | |
298 ><TD | |
299 ALIGN="LEFT" | |
300 VALIGN="TOP" | |
301 ><TT | |
302 CLASS="LITERAL" | |
303 >SDL_OPENGLBLIT</TT | |
304 ></TD | |
305 ><TD | |
306 ALIGN="LEFT" | |
307 VALIGN="TOP" | |
308 >Create an OpenGL rendering context, like above, but allow normal blitting operations.</TD | |
309 ></TR | |
310 ><TR | |
311 ><TD | |
312 ALIGN="LEFT" | |
313 VALIGN="TOP" | |
314 ><TT | |
315 CLASS="LITERAL" | |
316 >SDL_RESIZABLE</TT | |
317 ></TD | |
318 ><TD | |
319 ALIGN="LEFT" | |
320 VALIGN="TOP" | |
321 >Create a resizable window. When the window is resized by the user a <A | |
322 HREF="sdlresizeevent.html" | |
323 ><TT | |
324 CLASS="LITERAL" | |
325 >SDL_VIDEORESIZE</TT | |
326 ></A | |
327 > event is generated and <TT | |
328 CLASS="FUNCTION" | |
329 >SDL_SetVideoMode</TT | |
330 > can be called again with the new size.</TD | |
331 ></TR | |
332 ><TR | |
333 ><TD | |
334 ALIGN="LEFT" | |
335 VALIGN="TOP" | |
336 ><TT | |
337 CLASS="LITERAL" | |
338 >SDL_NOFRAME</TT | |
339 ></TD | |
340 ><TD | |
341 ALIGN="LEFT" | |
342 VALIGN="TOP" | |
343 >If possible, <TT | |
344 CLASS="LITERAL" | |
345 >SDL_NOFRAME</TT | |
346 > causes SDL to create a window with no title bar or frame decoration. Fullscreen modes automatically have this flag set.</TD | |
347 ></TR | |
348 ></TBODY | |
349 ></TABLE | |
350 ><P | |
351 ></P | |
352 ></DIV | |
353 ><DIV | |
354 CLASS="NOTE" | |
355 ><BLOCKQUOTE | |
356 CLASS="NOTE" | |
357 ><P | |
358 ><B | |
359 >Note: </B | |
360 >Whatever <TT | |
361 CLASS="PARAMETER" | |
362 ><I | |
363 >flags</I | |
364 ></TT | |
365 > <TT | |
366 CLASS="FUNCTION" | |
367 >SDL_SetVideoMode</TT | |
368 > could satisfy are set in the <TT | |
369 CLASS="STRUCTFIELD" | |
370 ><I | |
371 >flags</I | |
372 ></TT | |
373 > member of the returned surface.</P | |
374 ></BLOCKQUOTE | |
375 ></DIV | |
376 ></DIV | |
377 ><DIV | |
378 CLASS="REFSECT1" | |
379 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
380 NAME="AEN921" |
0 | 381 ></A |
382 ><H2 | |
383 >Return Value</H2 | |
384 ><P | |
385 >The framebuffer surface, or <SPAN | |
386 CLASS="RETURNVALUE" | |
387 >NULL</SPAN | |
388 > if it fails.</P | |
389 ></DIV | |
390 ><DIV | |
391 CLASS="REFSECT1" | |
392 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
393 NAME="AEN925" |
0 | 394 ></A |
395 ><H2 | |
396 >See Also</H2 | |
397 ><P | |
398 ><A | |
399 HREF="sdllocksurface.html" | |
400 ><TT | |
401 CLASS="FUNCTION" | |
402 >SDL_LockSurface</TT | |
403 ></A | |
404 >, | |
405 <A | |
406 HREF="sdlsetcolors.html" | |
407 ><TT | |
408 CLASS="FUNCTION" | |
409 >SDL_SetColors</TT | |
410 ></A | |
411 >, | |
412 <A | |
413 HREF="sdlflip.html" | |
414 ><TT | |
415 CLASS="FUNCTION" | |
416 >SDL_Flip</TT | |
417 ></A | |
418 >, | |
419 <A | |
420 HREF="sdlsurface.html" | |
421 ><SPAN | |
422 CLASS="STRUCTNAME" | |
423 >SDL_Surface</SPAN | |
424 ></A | |
425 ></P | |
426 ></DIV | |
427 ><DIV | |
428 CLASS="NAVFOOTER" | |
429 ><HR | |
430 ALIGN="LEFT" | |
431 WIDTH="100%"><TABLE | |
432 WIDTH="100%" | |
433 BORDER="0" | |
434 CELLPADDING="0" | |
435 CELLSPACING="0" | |
436 ><TR | |
437 ><TD | |
438 WIDTH="33%" | |
439 ALIGN="left" | |
440 VALIGN="top" | |
441 ><A | |
442 HREF="sdlvideomodeok.html" | |
443 >Prev</A | |
444 ></TD | |
445 ><TD | |
446 WIDTH="34%" | |
447 ALIGN="center" | |
448 VALIGN="top" | |
449 ><A | |
450 HREF="index.html" | |
451 >Home</A | |
452 ></TD | |
453 ><TD | |
454 WIDTH="33%" | |
455 ALIGN="right" | |
456 VALIGN="top" | |
457 ><A | |
458 HREF="sdlupdaterect.html" | |
459 >Next</A | |
460 ></TD | |
461 ></TR | |
462 ><TR | |
463 ><TD | |
464 WIDTH="33%" | |
465 ALIGN="left" | |
466 VALIGN="top" | |
467 >SDL_VideoModeOK</TD | |
468 ><TD | |
469 WIDTH="34%" | |
470 ALIGN="center" | |
471 VALIGN="top" | |
472 ><A | |
473 HREF="video.html" | |
474 >Up</A | |
475 ></TD | |
476 ><TD | |
477 WIDTH="33%" | |
478 ALIGN="right" | |
479 VALIGN="top" | |
480 >SDL_UpdateRect</TD | |
481 ></TR | |
482 ></TABLE | |
483 ></DIV | |
484 ></BODY | |
485 ></HTML | |
486 > |