John Howard
Posts: 2
Joined: Wed May 15, 2019 8:09 pm

vgfont.h #define GRAPHICS_RGBA888 bug

Wed May 15, 2019 8:56 pm

opt/vc/src/hello_pi/

hello_font demo revealed a bug with GRAPHICS_RGBA32 swapped Red component with Blue component.

I located actual bug in its redefinition in libs/vgfont/vgfont.h define GRAPHICS_RGBA888:

Code: Select all

[email protected]:/opt/vc/src/hello_pi/libs/vgfont $ cat vgfont.diff
48c48
< #define GRAPHICS_RGBA888( r, g, b, a ) ( (((a) << (8+8+8)) & ALPHA_888_MASK) | (((b) << (8+8)) & R_888_MASK) | (((g) << 8) & G_888_MASK) | ((r) & B_888_MASK) )
---
> #define GRAPHICS_RGBA888( r, g, b, a ) ( (((a) << (8+8+8)) & ALPHA_888_MASK) | (((r) << (8+8)) & R_888_MASK) | (((g) << 8) & G_888_MASK) | ((b) & B_888_MASK) )
I am a Software Engineer new to Pi systems.

(Thanks for low-level access to such a powerful GPU. I wish there was a demo of Khronos.org OpenWF-Composition and a forum to discuss OpenWF. I am wondering why OpenWF-Display is not provided, it is free from Khronos to Broadcom and anybody. By default, it supports up to four displays: useful for Pi HDMI & DSI LCD's. Ideal for Compute Modules.)

Return to “OpenVG”