Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2011-03-11 20:45:48
Size: 788
Editor: SheenaSmith
Comment: minor change
Revision 3 as of 2011-03-21 17:17:26
Size: 894
Editor: SheenaSmith
Comment: update content - w/ Sam; remove draft
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 6: Line 5:
Use this function to create an [[SDL_PixelFormat]] structure from an ,,a pixel format enum,, [[SDL_PixelFormatEnum]]. Use this function to create an [[SDL_PixelFormat]] structure corresponding to a pixel format.
Line 16: Line 15:
||'''pixel_format'''||one of the [[SDL_PixelFormatEnum]] values|| ||'''pixel_format'''||one of the [[SDL_PixelFormatEnum]] values; see [[#Remarks|Remarks]] for details||
Line 19: Line 18:
Returns the new [[SDL_PixelFormat]] structure or NULL on error. Returns the new [[SDL_PixelFormat]] structure or NULL on error; call [[SDL_GetError]]() for more information.
Line 27: Line 26:
''You can add useful comments here'' '''pixel_format''' may be one of the following:
<<Include(SDL_PixelFormatEnum, , , from="Start Include here.", to="##End Include here.")>>

SDL_AllocFormat

Use this function to create an SDL_PixelFormat structure corresponding to a pixel format.

Syntax

SDL_PixelFormat* SDL_AllocFormat(Uint32 pixel_format)

Function Parameters

pixel_format

one of the SDL_PixelFormatEnum values; see Remarks for details

Return Value

Returns the new SDL_PixelFormat structure or NULL on error; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

pixel_format may be one of the following:

SDL_PIXELFORMAT_UNKNOWN

SDL_PIXELFORMAT_INDEX1LSB

SDL_PIXELFORMAT_INDEX1MSB

SDL_PIXELFORMAT_INDEX4LSB

SDL_PIXELFORMAT_INDEX4MSB

SDL_PIXELFORMAT_INDEX8

SDL_PIXELFORMAT_RGB332

SDL_PIXELFORMAT_RGB444

SDL_PIXELFORMAT_RGB555

SDL_PIXELFORMAT_BGR555

SDL_PIXELFORMAT_ARGB4444

SDL_PIXELFORMAT_RGBA4444

SDL_PIXELFORMAT_ABGR4444

SDL_PIXELFORMAT_BGRA4444

SDL_PIXELFORMAT_ARGB1555

SDL_PIXELFORMAT_RGBA5551

SDL_PIXELFORMAT_ABGR1555

SDL_PIXELFORMAT_BGRA5551

SDL_PIXELFORMAT_RGB565

SDL_PIXELFORMAT_BGR565

SDL_PIXELFORMAT_RGB24

SDL_PIXELFORMAT_BGR24

SDL_PIXELFORMAT_RGB888

SDL_PIXELFORMAT_RGBX8888

SDL_PIXELFORMAT_BGR888

SDL_PIXELFORMAT_BGRX8888

SDL_PIXELFORMAT_ARGB8888

SDL_PIXELFORMAT_RGBA8888

SDL_PIXELFORMAT_ABGR8888

SDL_PIXELFORMAT_BGRA8888

SDL_PIXELFORMAT_ARGB2101010

SDL_PIXELFORMAT_RGBA32

alias for RGBA byte array of color data, for the current platform (>= SDL 2.0.5)

SDL_PIXELFORMAT_ARGB32

alias for ARGB byte array of color data, for the current platform (>= SDL 2.0.5)

SDL_PIXELFORMAT_BGRA32

alias for BGRA byte array of color data, for the current platform (>= SDL 2.0.5)

SDL_PIXELFORMAT_ABGR32

alias for ABGR byte array of color data, for the current platform (>= SDL 2.0.5)

SDL_PIXELFORMAT_YV12

planar mode: Y + V + U (3 planes)

SDL_PIXELFORMAT_IYUV

planar mode: Y + U + V (3 planes)

SDL_PIXELFORMAT_YUY2

packed mode: Y0+U0+Y1+V0 (1 plane)

SDL_PIXELFORMAT_UYVY

packed mode: U0+Y0+V0+Y1 (1 plane)

SDL_PIXELFORMAT_YVYU

packed mode: Y0+V0+Y1+U0 (1 plane)

SDL_PIXELFORMAT_NV12

planar mode: Y + U/V interleaved (2 planes) (>= SDL 2.0.4)

SDL_PIXELFORMAT_NV21

planar mode: Y + V/U interleaved (2 planes) (>= SDL 2.0.4)


CategoryAPI, CategoryPixels

None: SDL_AllocFormat (last edited 2015-09-17 21:36:32 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit