Add WebGLSampler support

Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.13
This commit is contained in:
Mátyás Mustoha 2019-10-04 11:22:07 +02:00
parent 78438113d4
commit 26df1962c3
16 changed files with 394 additions and 88 deletions

View file

@ -660,3 +660,14 @@ macro_rules! impl_rare_data (
}
);
);
#[macro_export]
macro_rules! optional_root_object_to_js_or_null {
($cx: expr, $binding:expr) => {{
rooted!(in($cx) let mut rval = NullValue());
if let Some(object) = $binding {
object.to_jsval($cx, rval.handle_mut());
}
rval.get()
}};
}