-
Notifications
You must be signed in to change notification settings - Fork 0
/
WEBGL_lose_context.cljs
29 lines (20 loc) · 1.02 KB
/
WEBGL_lose_context.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(ns web.gl.WEBGL_lose_context
"The WEBGL_lose_context extension is part of the WebGL API and
functions to simulate losing and restoring a `web.gl.WebGLRenderingContext`."
(:refer-clojure :exclude []))
(defn lose-context
"Method.
The WEBGL_lose_context.loseContext() method is part of the WebGL
and allows you to simulate losing the context of a `web.gl.WebGLRenderingContext`
`gl.getExtension('WEBGL_lose_context').loseContext();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context/loseContext`"
[this & args]
(-> this .-loseContext (.apply this (clj->js args))))
(defn restore-context
"Method.
The WEBGL_lose_context.restoreContext() method is part of the
API and allows you to simulate restoring the context of a `web.gl.WebGLRenderingContext`
`gl.getExtension('WEBGL_lose_context').restoreContext();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context/restoreContext`"
[this & args]
(-> this .-restoreContext (.apply this (clj->js args))))