diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index d4100382..ef577758 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -60,6 +60,15 @@ jobs: command: test args: --workspace --all-features + - name: Test GLES + if: matrix.name == 'Linux' + uses: actions-rs/cargo@v1 + with: + command: build + args: --example bunnymark + env: + RUSTFLAGS: "--cfg gles" + fmt: name: Format runs-on: ubuntu-latest diff --git a/blade-graphics/src/gles/egl.rs b/blade-graphics/src/gles/egl.rs index 42fd6c07..30522174 100644 --- a/blade-graphics/src/gles/egl.rs +++ b/blade-graphics/src/gles/egl.rs @@ -737,7 +737,7 @@ impl EglContext { &self, desc: &crate::ContextDesc, ) -> (glow::Context, super::Capabilities, super::Limits) { - let gl = glow::Context::from_loader_function(|name| { + let mut gl = glow::Context::from_loader_function(|name| { self.instance .get_proc_address(name) .map_or(ptr::null(), |p| p as *const _) diff --git a/blade-render/src/lib.rs b/blade-render/src/lib.rs index 4bded363..31f410f2 100644 --- a/blade-render/src/lib.rs +++ b/blade-render/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg(not(target_arch = "wasm32"))] +#![cfg(not(any(gles, target_arch = "wasm32")))] #![allow(irrefutable_let_patterns, clippy::new_without_default)] #![warn( trivial_casts, diff --git a/src/lib.rs b/src/lib.rs index 9d7c5412..ae076aa7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg(not(target_arch = "wasm32"))] +#![cfg(not(any(gles, target_arch = "wasm32")))] #![allow( irrefutable_let_patterns, clippy::new_without_default,