@geastack/native-webgl-angle 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,6 +35,25 @@ export function nativeWebGLSwap(): void {
35
35
  threeWebGLSwap()
36
36
  }
37
37
 
38
+ // GPU time-elapsed timers (GL_EXT_disjoint_timer_query): begin returns a timer id (0 when
39
+ // unsupported), end closes the open timer, and result is the elapsed nanoseconds, or -1 while the
40
+ // GPU has not finished it. A timer is released once its result has been read.
41
+ export function nativeWebGLTimerBegin(): number {
42
+ return threeWebGLTimerBegin()
43
+ }
44
+ export function nativeWebGLTimerEnd(): void {
45
+ threeWebGLTimerEnd()
46
+ }
47
+ export function nativeWebGLTimerResult(timer: number): number {
48
+ return threeWebGLTimerResult(timer)
49
+ }
50
+ /** @gea-host-inert Native state only; retains no script references and invokes no script. */
51
+ declare function threeWebGLTimerBegin(): number
52
+ /** @gea-host-inert Native state only; retains no script references and invokes no script. */
53
+ declare function threeWebGLTimerEnd(): void
54
+ /** @gea-host-inert Native state only; retains no script references and invokes no script. */
55
+ declare function threeWebGLTimerResult(timer: number): number
56
+
38
57
  export function logNativeWebGL(message: string): void {
39
58
  threeAngleSmokeLog(message)
40
59
  }