No description
  • C++ 83.8%
  • C 14.3%
  • Rust 0.8%
  • Yacc 0.6%
  • Lex 0.3%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2018-11-10 11:41:33 -05:00
gfx/angle Import gfx/angle from mozilla-central 2018-03-03 12:10:47 +01:00
src Fix a few FFI constants 2018-08-31 14:42:03 +02:00
.gitignore Add an empty Rust crate 2018-03-03 12:10:47 +01:00
.travis.yml Remove unneeded webhook notification 2018-11-10 16:46:41 +01:00
appveyor.yml Add some CI 2018-03-05 16:36:14 +01:00
build.rs Require C++ 11 2018-08-06 05:04:40 -05:00
build_data.rs And OpenGL ES and EGL bindings 2018-03-03 17:20:37 +01:00
Cargo.toml Fix a few FFI constants 2018-08-31 14:42:03 +02:00
generate_build_data.py And OpenGL ES and EGL bindings 2018-03-03 17:20:37 +01:00
LICENSE Copy the LICENSE file from upstream ANGLE. 2018-03-03 12:10:47 +01:00
README.md Make the 'egl' cargo feature do nothing instead a build error on non-Windows 2018-03-09 19:04:36 +01:00

mozangle

Mozillas fork of Google ANGLE, repackaged as a Rust crate.

  • ANGLE is an implementation of OpenGL ES. Its official build system is gn, from Chromiums depot_tools.

  • mozilla/angle on GitHub is a fork with some Gecko-specific patches.

  • gfx/angle in mozilla-central is generated from that. update-angle.py runs gn desc to extract information from the official build system, copies relevant source files, and creates moz.build files for Geckos build system.

  • This repository imports a copy of the gfx/angle directory. The generate_build_data.py script turns data from moz.build files into a Rust source file. (This script supports just enough of the moz.build format for this specific purpose.) Finally, a Cargo build script drives the C++ compilation with the cc crate based on that data.

Feature flags

By default, this crate only compiles the shader translator.

In Windows, the egl Cargo feature enables the EGL and OpenGL ES implementations. Although upstream ANGLE supports more platforms, this crate only configures the Direct3D 11 rendering backend.

[dependencies]
mozangle = { version = "0.1", features = ["egl"] }

Updating ANGLE

To update:

  • Remove gfx/angle entirely
  • Copy a new version of it from mozilla-central
  • Run python3 generate_build_data.py
  • In the commit message, include the mozilla-central commit hash.