19 #define RGB565(r,g,b) (((b)&0x1f)|(((g)&0x3f)<<5)|(((r)&0x1f)<<11))
22 #define RGB8_to_565(r,g,b) (((b)>>3)&0x1f)|((((g)>>2)&0x3f)<<5)|((((r)>>3)&0x1f)<<11)
bool gfxIs3D(void)
Retrieves the status of the 3D stereoscopic effect on the top screen.
void gfxSwapBuffers(void)
Updates the configuration of both screens.
void gfxInit(GSPGPU_FramebufferFormat topFormat, GSPGPU_FramebufferFormat bottomFormat, bool vrambuffers)
Initializes the LCD framebuffers.
void gfxSetWide(bool enable)
Enables or disables the 800px (double-height) high resolution display mode of the top screen.
void gfxInitDefault(void)
Initializes the LCD framebuffers with default parameters This is equivalent to calling:
void gfxSwapBuffersGpu(void)
Same as gfxSwapBuffers (formerly different).
u8 * gfxGetFramebuffer(gfxScreen_t screen, gfx3dSide_t side, u16 *width, u16 *height)
Retrieves the framebuffer of the specified screen to which graphics should be rendered.
GSPGPU_FramebufferFormat gfxGetScreenFormat(gfxScreen_t screen)
Retrieves the current pixel format of a screen.
gfxScreen_t
Screen IDs.
Definition: gfx.h:25
@ GFX_BOTTOM
Bottom screen.
Definition: gfx.h:27
@ GFX_TOP
Top screen.
Definition: gfx.h:26
void gfxSet3D(bool enable)
Enables or disables the 3D stereoscopic effect on the top screen.
void gfxScreenSwapBuffers(gfxScreen_t scr, bool hasStereo)
Updates the configuration of the specified screen, swapping the buffers if double buffering is enable...
void gfxSetDoubleBuffering(gfxScreen_t screen, bool enable)
Enables or disables double buffering on a screen.
void gfxExit(void)
Deinitializes and frees the LCD framebuffers.
CTR_DEPRECATED void gfxConfigScreen(gfxScreen_t scr, bool immediate)
Same as gfxScreenSwapBuffers, but with hasStereo set to true.
void gfxSetScreenFormat(gfxScreen_t screen, GSPGPU_FramebufferFormat format)
Changes the pixel format of a screen.
gfx3dSide_t
Top screen framebuffer side.
Definition: gfx.h:36
@ GFX_LEFT
Left eye framebuffer.
Definition: gfx.h:37
@ GFX_RIGHT
Right eye framebuffer.
Definition: gfx.h:38
bool gfxIsWide(void)
Retrieves the status of the 800px (double-height) high resolution display mode of the top screen.
void gfxFlushBuffers(void)
Flushes the data cache for the current framebuffers.
#define GSP_SCREEN_BOTTOM
ID of the bottom screen.
Definition: gspgpu.h:8
#define GSP_SCREEN_TOP
ID of the top screen.
Definition: gspgpu.h:7
GSPGPU_FramebufferFormat
Framebuffer format.
Definition: gspgpu.h:28
#define CTR_DEPRECATED
Flags a function as deprecated.
Definition: types.h:56
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
uint16_t u16
16-bit unsigned integer
Definition: types.h:22