1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
\r
5 <meta http-equiv="Content-Style-Type" content="text/css">
\r
6 <meta name="keywords" content="Simple Directmedia Layer SDL2.0">
\r
7 <link rel="top" href="index.html" title="
\83z
\81[
\83\80">
\r
8 <link rel="parent" href="CategoryPixels.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_GetPixelFormatName</title>
\r
12 <a href="index.html">
\96Ú
\8e\9f</a> - <a href="ApiByCategory.html">API(
\8b@
\94\
\95Ê)</a> - <a href="CategoryPixels.html">
\83s
\83N
\83Z
\83\8b\8c`
\8e®
\82Æ
\95Ï
\8a·</a> - SDL_GetPixelFormatName
\r
14 <h1>SDL_GetPixelFormatName</h1>
\r
15 \83\86\81[
\83U
\82ª
\93Ç
\82ß
\82é
\83s
\83N
\83Z
\83\8b\8c`
\8e®
\82Ì
\96¼
\91O
\82ð
\93¾
\82é
\r
17 <code>const char* SDL_GetPixelFormatName(Uint32 format)</code>
\r
19 <table border="1" summary="SDL_GetPixelFormatName">
\r
20 <tr><td>format</td><td><a href="SDL_PixelFormatEnum.html">SDL_PixelFormatEnum</a>
\82Ì
\92l
\82Ì1
\82Â</td></tr>
\r
22 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
26 SDL_Surface* surface = ...; //
\82Ç
\82±
\82©
\82Å
\90¶
\90¬
\82µ
\82½
\83T
\81[
\83t
\83F
\83C
\83X
\r
27 SDL_PixelFormat* pixelFormat = surface->format;
\r
28 Uint32 pixelFormatEnum = pixelFormat->format;
\r
29 const char* surfacePixelFormatName = SDL_GetPixelFormatName(pixelFormatEnum);
\r
30 SDL_Log("
\82±
\82Ì
\83T
\81[
\83t
\83F
\83C
\83X
\82Ì
\83s
\83N
\83Z
\83\8b\8c`
\8e®
\82Í %s", surfacePixelFormatName);
\r
31 //
\82±
\82Ì
\83T
\81[
\83t
\83F
\83C
\83X
\82Ì
\83s
\83N
\83Z
\83\8b\8c`
\8e®
\82Í "SDL_PIXELFORMAT_ABGR8888"
\82Ì
\82æ
\82¤
\82É
\95\
\8e¦
\82³
\82ê
\82é
\r
35 <h2>
\96ß
\82è
\92l</h2>
\r
36 \83\86\81[
\83U
\82ª
\93Ç
\82ß
\82é
\83s
\83N
\83Z
\83\8b\8c`
\8e®
\82Ì
\96¼
\91O
\82ð
\96ß
\82·.
\r
37 \83s
\83N
\83Z
\83\8b\8c`
\8e®
\82ª
\95s
\96¾
\82Ì
\8fê
\8d\87\82Í"SDL_PIXELFORMAT_UNKNOWN"
\82ð
\96ß
\82·.
\r
38 <h2>
\83o
\81[
\83W
\83\87\83\93</h2>
\r
42 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
43 <a href="https://wiki.libsdl.org/SDL_GetPixelFormatName">SDL_GetPixelFormatName - SDL Wiki</a>
\r