rpi_window

Crates.iorpi_window
lib.rsrpi_window
version1.0.1
sourcesrc
created_at2021-03-11 14:29:25.850389
updated_at2021-03-11 18:36:17.92843
descriptionRaspberry Pi window initialization for GPU rendering
homepagehttps://github.com/gustafla/rpi_window
repositoryhttps://github.com/gustafla/rpi_window
max_upload_size
id367314
size17,768
Lauri Gustafsson (gustafla)

documentation

README

Dispmanx window for EGL/GL on the Raspberry Pi

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.

Usage

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
Commit count: 22

cargo fmt