Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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