Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/modules/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const fonts = {
};

function start() {
const color = new Float32Array([255, 255, 255, 1]);
const color = new Float32Array([255, 255, 255, 0]);
openVG.setFVOL(VG_CLEAR_COLOR, color, 0, 4);
openVG.clear(0, 0, openVG.screen.width, openVG.screen.height);
(color[0] = 0), (color[1] = 0), (color[2] = 0);
Expand Down
9 changes: 7 additions & 2 deletions src/egl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ extern void egl::Init() {

static EGL_DISPMANX_WINDOW_T nativewindow;

static VC_DISPMANX_ALPHA_T alpha = {
DISPMANX_FLAGS_ALPHA_FROM_SOURCE,
255, 0
};

// bcm_host_init() must be called before anything else
bcm_host_init();

Expand Down Expand Up @@ -107,10 +112,10 @@ extern void egl::Init() {
dispman_update = vc_dispmanx_update_start(0);

dispman_element =
vc_dispmanx_element_add(dispman_update, dispman_display, 0 /*layer */ ,
vc_dispmanx_element_add(dispman_update, dispman_display, 1 /*layer */ ,
&dst_rect, 0 /*src */ , &src_rect,
DISPMANX_PROTECTION_NONE,
0 /*alpha */ , 0 /*clamp */ ,
&alpha /*alpha */ , 0 /*clamp */ ,
DISPMANX_NO_ROTATE /*transform */);

nativewindow.element = dispman_element;
Expand Down