comparison docs/html/sdlcreatergbsurface.html @ 0:74212992fb08

Initial revision
author Sam Lantinga <slouken@lokigames.com>
date Thu, 26 Apr 2001 16:45:43 +0000
parents
children 55f1f1b3e27d
comparison
equal deleted inserted replaced
-1:000000000000 0:74212992fb08
1 <HTML
2 ><HEAD
3 ><TITLE
4 >SDL_CreateRGBSurface</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.61
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_GetRGBA"
17 HREF="sdlgetrgba.html"><LINK
18 REL="NEXT"
19 TITLE="SDL_CreateRGBSurfaceFrom"
20 HREF="sdlcreatergbsurfacefrom.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="sdlgetrgba.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="sdlcreatergbsurfacefrom.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="SDLCREATERGBSURFACE"
71 >SDL_CreateRGBSurface</A
72 ></H1
73 ><DIV
74 CLASS="REFNAMEDIV"
75 ><A
76 NAME="AEN1316"
77 ></A
78 ><H2
79 >Name</H2
80 >SDL_CreateRGBSurface&nbsp;--&nbsp;Create an empty SDL_Surface</DIV
81 ><DIV
82 CLASS="REFSYNOPSISDIV"
83 ><A
84 NAME="AEN1319"
85 ></A
86 ><H2
87 >Synopsis</H2
88 ><DIV
89 CLASS="FUNCSYNOPSIS"
90 ><A
91 NAME="AEN1320"
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_CreateRGBSurface</B
105 ></CODE
106 >(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);</CODE
107 ></P
108 ><P
109 ></P
110 ></DIV
111 ></DIV
112 ><DIV
113 CLASS="REFSECT1"
114 ><A
115 NAME="AEN1326"
116 ></A
117 ><H2
118 >Description</H2
119 ><P
120 >Allocate an empty surface (must be called after <A
121 HREF="sdlsetvideomode.html"
122 >SDL_SetVideoMode</A
123 >)</P
124 ><P
125 >If <TT
126 CLASS="PARAMETER"
127 ><I
128 >depth</I
129 ></TT
130 > is 8 bits an empty palette is allocated for the surface, otherwise a 'packed-pixel' <A
131 HREF="sdlpixelformat.html"
132 ><SPAN
133 CLASS="STRUCTNAME"
134 >SDL_PixelFormat</SPAN
135 ></A
136 > is created using the <TT
137 CLASS="PARAMETER"
138 ><I
139 >[RGBA]mask</I
140 ></TT
141 >'s provided (see <A
142 HREF="sdlpixelformat.html"
143 ><SPAN
144 CLASS="STRUCTNAME"
145 >SDL_PixelFormat</SPAN
146 ></A
147 >). The <TT
148 CLASS="PARAMETER"
149 ><I
150 >flags</I
151 ></TT
152 > specifies the type of surface that should be created, it is an OR'd combination of the following possible values.</P
153 ><DIV
154 CLASS="INFORMALTABLE"
155 ><A
156 NAME="AEN1338"
157 ></A
158 ><P
159 ></P
160 ><TABLE
161 BORDER="1"
162 CLASS="CALSTABLE"
163 ><TBODY
164 ><TR
165 ><TD
166 ALIGN="LEFT"
167 VALIGN="TOP"
168 ><TT
169 CLASS="LITERAL"
170 >SDL_SWSURFACE</TT
171 ></TD
172 ><TD
173 ALIGN="LEFT"
174 VALIGN="TOP"
175 >SDL will create the surface in system memory. This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting.</TD
176 ></TR
177 ><TR
178 ><TD
179 ALIGN="LEFT"
180 VALIGN="TOP"
181 ><TT
182 CLASS="LITERAL"
183 >SDL_HWSURFACE</TT
184 ></TD
185 ><TD
186 ALIGN="LEFT"
187 VALIGN="TOP"
188 >SDL will attempt to create the surface in video memory. This will allow SDL to take advantage of Video-&#62;Video blits (which are often accelerated).</TD
189 ></TR
190 ><TR
191 ><TD
192 ALIGN="LEFT"
193 VALIGN="TOP"
194 ><TT
195 CLASS="LITERAL"
196 >SDL_SRCCOLORKEY</TT
197 ></TD
198 ><TD
199 ALIGN="LEFT"
200 VALIGN="TOP"
201 >With this flag SDL will attempt to find the best location for this surface, either in system memory or video memory, to obtain hardware colorkey blitting support.</TD
202 ></TR
203 ><TR
204 ><TD
205 ALIGN="LEFT"
206 VALIGN="TOP"
207 ><TT
208 CLASS="LITERAL"
209 >SDL_SRCALPHA</TT
210 ></TD
211 ><TD
212 ALIGN="LEFT"
213 VALIGN="TOP"
214 >With this flag SDL will attempt to find the best location for this surface, either in system memory or video memory, to obtain hardware alpha support</TD
215 ></TR
216 ></TBODY
217 ></TABLE
218 ><P
219 ></P
220 ></DIV
221 ></DIV
222 ><DIV
223 CLASS="REFSECT1"
224 ><A
225 NAME="AEN1357"
226 ></A
227 ><H2
228 >See Also</H2
229 ><P
230 ><A
231 HREF="sdlcreatergbsurfacefrom.html"
232 ><TT
233 CLASS="FUNCTION"
234 >SDL_CreateRGBSurfaceFrom</TT
235 ></A
236 >,
237 <A
238 HREF="sdlfreesurface.html"
239 ><TT
240 CLASS="FUNCTION"
241 >SDL_FreeSurface</TT
242 ></A
243 >,
244 <A
245 HREF="sdlsetvideomode.html"
246 ><TT
247 CLASS="FUNCTION"
248 >SDL_SetVideoMode</TT
249 ></A
250 >,
251 <A
252 HREF="sdllocksurface.html"
253 ><TT
254 CLASS="FUNCTION"
255 >SDL_LockSurface</TT
256 ></A
257 >,
258 <A
259 HREF="sdlpixelformat.html"
260 ><SPAN
261 CLASS="STRUCTNAME"
262 >SDL_PixelFormat</SPAN
263 ></A
264 >,
265 <A
266 HREF="sdlsurface.html"
267 ><SPAN
268 CLASS="STRUCTNAME"
269 >SDL_Surface</SPAN
270 ></A
271 ></P
272 ></DIV
273 ><DIV
274 CLASS="NAVFOOTER"
275 ><HR
276 ALIGN="LEFT"
277 WIDTH="100%"><TABLE
278 WIDTH="100%"
279 BORDER="0"
280 CELLPADDING="0"
281 CELLSPACING="0"
282 ><TR
283 ><TD
284 WIDTH="33%"
285 ALIGN="left"
286 VALIGN="top"
287 ><A
288 HREF="sdlgetrgba.html"
289 >Prev</A
290 ></TD
291 ><TD
292 WIDTH="34%"
293 ALIGN="center"
294 VALIGN="top"
295 ><A
296 HREF="index.html"
297 >Home</A
298 ></TD
299 ><TD
300 WIDTH="33%"
301 ALIGN="right"
302 VALIGN="top"
303 ><A
304 HREF="sdlcreatergbsurfacefrom.html"
305 >Next</A
306 ></TD
307 ></TR
308 ><TR
309 ><TD
310 WIDTH="33%"
311 ALIGN="left"
312 VALIGN="top"
313 >SDL_GetRGBA</TD
314 ><TD
315 WIDTH="34%"
316 ALIGN="center"
317 VALIGN="top"
318 ><A
319 HREF="video.html"
320 >Up</A
321 ></TD
322 ><TD
323 WIDTH="33%"
324 ALIGN="right"
325 VALIGN="top"
326 >SDL_CreateRGBSurfaceFrom</TD
327 ></TR
328 ></TABLE
329 ></DIV
330 ></BODY
331 ></HTML
332 >