remove webgl-debug (#4083)

This commit is contained in:
Leslie Leigh
2019-03-22 10:44:47 +08:00
committed by Weiliang Wang
parent e5e53071c3
commit d7aaaa7397
6 changed files with 0 additions and 37 deletions
-14
View File
@@ -57,20 +57,6 @@ declare interface IWritableArrayLike<T> {
[index: number]: T;
}
declare module "webgl-debug" {
export function makeDebugContext(
webGLRenderingContext: WebGLRenderingContext,
throwOnGLError: (err: GLenum, funcName: string, ...args: any[]) => void
): WebGLRenderingContext;
export function makeDebugContext(
webGL2RenderingContext: WebGL2RenderingContext,
throwOnGLError: (err: GLenum, funcName: string, ...args: any[]) => void
): WebGL2RenderingContext;
export function glEnumToString(glEnum: GLenum): string;
}
declare namespace Editor {
function log (message?: any, ...optionalParams: any[]): void;
function error (message?: any, ...optionalParams: any[]): void;
-10
View File
@@ -1,4 +1,3 @@
import * as WebGLDeveloperTools from 'webgl-debug';
import { GFXBindingLayout, IGFXBindingLayoutInfo } from '../binding-layout';
import { GFXBuffer, IGFXBufferInfo } from '../buffer';
import { GFXCommandAllocator, IGFXCommandAllocatorInfo } from '../command-allocator';
@@ -193,11 +192,6 @@ export class WebGLGFXDevice extends GFXDevice {
};
this._webGLRC = this._canvas.getContext('webgl', webGLCtxAttribs);
/*
if (this._webGLRC && info.debug) {
this._webGLRC = WebGLDeveloperTools.makeDebugContext(this._webGLRC, this._onWebGLError.bind(this));
}
*/
} catch (err) {
console.error(err);
return false;
@@ -558,8 +552,4 @@ export class WebGLGFXDevice extends GFXDevice {
gl.colorMask(true, true, true, true);
gl.blendColor(0.0, 0.0, 0.0, 0.0);
}
private _onWebGLError (error: GLenum, functionName: string, ...args: any[]) {
throw new Error(`${WebGLDeveloperTools.glEnumToString(error)} was caused by call to ${functionName}`);
}
}
-10
View File
@@ -1,4 +1,3 @@
import * as WebGLDeveloperTools from 'webgl-debug';
import { GFXBindingLayout, IGFXBindingLayoutInfo } from '../binding-layout';
import { GFXBuffer, IGFXBufferInfo } from '../buffer';
import { GFXCommandAllocator, IGFXCommandAllocatorInfo } from '../command-allocator';
@@ -119,11 +118,6 @@ export class WebGL2GFXDevice extends GFXDevice {
};
this._webGL2RC = this._canvas.getContext('webgl2', webGLCtxAttribs);
/*
if (this._webGL2RC && info.debug) {
this._webGL2RC = WebGLDeveloperTools.makeDebugContext(this._webGL2RC, this._onWebGLError.bind(this));
}
*/
} catch (err) {
console.error(err);
return false;
@@ -479,8 +473,4 @@ export class WebGL2GFXDevice extends GFXDevice {
gl.colorMask(true, true, true, true);
gl.blendColor(0.0, 0.0, 0.0, 0.0);
}
private _onWebGLError (error: GLenum, functionName: string, ...args: any[]) {
throw new Error(`${WebGLDeveloperTools.glEnumToString(error)} was caused by call to ${functionName}`);
}
}
-1
View File
@@ -78,7 +78,6 @@
"vinyl-buffer": "1.0.0",
"vinyl-source-stream": "1.0.0",
"watchify": "^3.7.0",
"webgl-debug": "github:cocos-creator/webgl-debug#f7f7f90",
"yargs": "^12.0.5"
}
}
-1
View File
@@ -66,7 +66,6 @@ async function _doBundle (options: IBuildOptions) {
commonjs({
namedExports: {
cannon: ['CANNON', 'Shape'],
'webgl-debug': ['makeDebugContext', 'glEnumToString'],
},
}),
];
-1
View File
@@ -63,7 +63,6 @@ export default {
commonjs({
namedExports: {
'cannon': ['CANNON'],
'webgl-debug': ['makeDebugContext', 'glEnumToString']
}
}),
]