@@ -43,16 +43,11 @@ export class TelemetryManager {
let logErrors = true;
while (logErrors) {
- let gl = (<any>engine)._gl;
- if (gl && gl.getError) {
- let error = gl.getError();
- if (error === gl.NO_ERROR) {
- logErrors = false;
- } else {
- this.broadcast("WebGL Error", viewerId, { error: error });
- }
+ let error = engine.getError();
+ if (error === 0) {
logErrors = false;
+ } else {
+ this.broadcast("WebGL Error", viewerId, { error: error });
}
@@ -401,6 +401,15 @@
+ /**
+ * Get the current error code of the webGL context
+ * @returns the error code
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError
+ */
+ public getError(): number {
+ return 0;
+ }
+
public updateDynamicIndexBuffer(indexBuffer: WebGLBuffer, indices: IndicesArray, offset: number = 0): void {