Gotta go fast!

This commit is contained in:
Rafał Kołucki 2026-05-26 00:02:04 +02:00
parent b4e85b87be
commit 332694aa10
4 changed files with 24 additions and 17 deletions

View file

@ -25,12 +25,25 @@ extern "C" {
* DEFINES
*********************/
// TODO: make it configurable for RGB888/RGB565
// (currently hardcoded to ARGB888, otherwise I was getting only white screen)
#define CTR_LV_COLOR_FORMAT LV_COLOR_FORMAT_ARGB8888
#define CTR_TEX_COLOR_FORMAT GPU_RGBA8
#define CTR_TR_IN_COLOR_FORMAT GX_TRANSFER_FMT_RGBA8
#define CTR_TR_OUT_COLOR_FORMAT GX_TRANSFER_FMT_RGBA8
#if LV_COLOR_DEPTH == 32
// same as 24-bit - translation from ARGB8888 to RGBA8888 would require software translation
#define CTR_LV_COLOR_FORMAT LV_COLOR_FORMAT_RGB888
#define CTR_TEX_COLOR_FORMAT GPU_RGB8
#define CTR_TR_IN_COLOR_FORMAT GX_TRANSFER_FMT_RGB8
#define CTR_TR_OUT_COLOR_FORMAT GX_TRANSFER_FMT_RGB8
#elif LV_COLOR_DEPTH == 24
#define CTR_LV_COLOR_FORMAT LV_COLOR_FORMAT_RGB888
#define CTR_TEX_COLOR_FORMAT GPU_RGB8
#define CTR_TR_IN_COLOR_FORMAT GX_TRANSFER_FMT_RGB8
#define CTR_TR_OUT_COLOR_FORMAT GX_TRANSFER_FMT_RGB8
#elif LV_COLOR_DEPTH == 16
#define CTR_LV_COLOR_FORMAT LV_COLOR_FORMAT_RGB565
#define CTR_TEX_COLOR_FORMAT GPU_RGB565
#define CTR_TR_IN_COLOR_FORMAT GX_TRANSFER_FMT_RGB565
#define CTR_TR_OUT_COLOR_FORMAT GX_TRANSFER_FMT_RGB565
#else
#error "Not supported LV_COLOR_DEPTH"
#endif
/**********************
* TYPEDEFS