factor out save/restore GL state so we can reuse it in webxr:
webxr code: https://github.com/servo/webxr/blob/e3249c3df967f16fab9928d053708bfb43487af3/webxr/gl_utils.rs#L100
surfman:
|
// Save the current GL state |
I think the closure approach would be the best (to prevent users to forget restore) and creating separate clear function would be useful too (for usage in closure).
factor out save/restore GL state so we can reuse it in webxr:
webxr code: https://github.com/servo/webxr/blob/e3249c3df967f16fab9928d053708bfb43487af3/webxr/gl_utils.rs#L100
surfman:
surfman/src/chains.rs
Line 357 in 7a2918d
I think the closure approach would be the best (to prevent users to forget restore) and creating separate clear function would be useful too (for usage in closure).