glemu 0.1.2

WebGL (via web_sys) to GL shims for Rust, based on Emscripten's GL emulation layer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(clippy::missing_safety_doc, clippy::too_many_arguments)]

mod core;
mod es3;
mod proc_table;

use crate::{registry::with_current_context_mut, state::ContextState};

pub use proc_table::get_proc_address;

pub(crate) static EMPTY_C_STRING: [u8; 1] = [0];

pub(crate) fn with_gl<R: Default>(f: impl FnOnce(&mut ContextState) -> R) -> R {
    with_current_context_mut(f).unwrap_or_default()
}