Skip to content

gustafla/rpi_window

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Rust bindings for Broadcom's VideoCore API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%