Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSD1963 - wrong colors if using sprites #3458

Open
elral opened this issue Aug 24, 2024 · 0 comments
Open

SSD1963 - wrong colors if using sprites #3458

elral opened this issue Aug 24, 2024 · 0 comments

Comments

@elral
Copy link

elral commented Aug 24, 2024

I am using a display with SSD1963 driver in 8 bit parallel mode connected to a Pico.

If I write directly to the display via tft->setTextColor(TFT_YELLOW); and e.g. tft->drawString("Test", 100, 100, 1); I am getting correct colors using the define TFT_RGB_ORDER=TFT_RGB. But if I am using sprites, e.g. spr[sel].fillRect(10, 10,100, 100, TFT_RED); and tft->pushImageDMA(100 * sel, 100, sprPtrAttInd[sel]); wrong colors are shown. E.g. red is displayed in green.

On a Pimoroni Tufty2040 with ST7789 display also in 8 bit parallel mode the exact same code is running fine where TFT_RGB_ORDER is not set.

The defines for the display in my platformIo.ini are:

-DSSD1963_800_DRIVER=1
-DTFT_PARALLEL_8_BIT
-DTFT_RGB_ORDER=TFT_RGB  	; required to get correct colors for tft.xyz()
;-DTFT_RGB_ORDER=TFT_BGR
-DTFT_CS=8
-DTFT_DC=9
-DTFT_RST=10	
-DTFT_WR=11
-DTFT_RD=12
-DTFT_D0=0
-DTFT_D1=1
-DTFT_D2=2
-DTFT_D3=3
-DTFT_D4=4
-DTFT_D5=5
-DTFT_D6=6
-DTFT_D7=7
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT6=1
-DLOAD_FONT7=1
-DLOAD_FONT8=1
-DLOAD_GFXFF=1
-DSMOOTH_FONT=1

I am wondering if the define TFT_RGB_ORDER is not considered for sprites?

/edit: setting spr[sel].setSwapBytes(true/false) does not help
One Exemplare is the bouncy circles I am using in my code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant