Crates.io | rpi_window |
lib.rs | rpi_window |
version | 1.0.1 |
source | src |
created_at | 2021-03-11 14:29:25.850389 |
updated_at | 2021-03-11 18:36:17.92843 |
description | Raspberry Pi window initialization for GPU rendering |
homepage | https://github.com/gustafla/rpi_window |
repository | https://github.com/gustafla/rpi_window |
max_upload_size | |
id | 367314 |
size | 17,768 |
This is an extremely trimmed fork of videocore for opening a window to render with EGL/OpenGL ES. If you need to use more of the VC API than this crate exposes, use the original videcore crate instead.
Call bcm_host::init
, create a dispmanx::Rect
for src and dest,
create a dispmanx::VCAlpha
, and call dispmanx::create_window
which returns a window struct which can be passed to eglCreateWindowSurface.
See examples for details.
When building, make sure pkg-config can find the driver userspace libraries.
Build with the envvar PKG_CONFIG_LIBDIR
set to /opt/vc/lib/pkgconfig
, and
PKG_CONFIG_ALLOW_CROSS
set to 1
if necessary.
See pkg-config-rs for details.
For example: to build and run the example on a Raspberry Pi, run
PKG_CONFIG_LIBDIR=/opt/vc/lib/pkgconfig cargo run --example gles2