renderer: shaders: nicer error message syntax
This commit is contained in:
parent
bfdecdbd3c
commit
448d8c52a4
1 changed files with 2 additions and 2 deletions
|
@ -61,14 +61,14 @@ export class Shaders {
|
||||||
|
|
||||||
private getAttribLocation(program: WebGLProgram, name: string): number {
|
private getAttribLocation(program: WebGLProgram, name: string): number {
|
||||||
const ret = this.gl.getAttribLocation(program, name);
|
const ret = this.gl.getAttribLocation(program, name);
|
||||||
if (ret < 0) throw new Error("unable to get location of attribute '" + name + "'");
|
if (ret < 0) throw new Error(`unable to get location of attribute '${name}'`);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation {
|
private getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation {
|
||||||
const ret = this.gl.getUniformLocation(program, name);
|
const ret = this.gl.getUniformLocation(program, name);
|
||||||
if (!ret) throw new Error("unable to get location of uniform '" + name + "'");
|
if (!ret) throw new Error(`unable to get location of uniform '${name}'`);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue