MCPcopy Create free account
hub / github.com/devkitPro/libctru / gspGetBytesPerPixel

Function gspGetBytesPerPixel

libctru/include/3ds/services/gspgpu.h:93–107  ·  view source on GitHub ↗

* @brief Gets the number of bytes per pixel for the specified format. * @param format See \ref GSPGPU_FramebufferFormat. * @return Bytes per pixel. */

Source from the content-addressed store, hash-verified

91 * @return Bytes per pixel.
92 */
93static inline unsigned gspGetBytesPerPixel(GSPGPU_FramebufferFormat format)
94{
95 switch (format)
96 {
97 case GSP_RGBA8_OES:
98 return 4;
99 default:
100 case GSP_BGR8_OES:
101 return 3;
102 case GSP_RGB565_OES:
103 case GSP_RGB5_A1_OES:
104 case GSP_RGBA4_OES:
105 return 2;
106 }
107}
108
109/// Initializes GSPGPU.
110Result gspInit(void);

Callers 5

gfxSetScreenFormatFunction · 0.85
gfxPresentFramebufferFunction · 0.85
gfxFlushBuffersFunction · 0.85
aptInitCaptureInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected