From b04f18e29ac8efddaece673eed91cba32cad5c2c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 30 Oct 2018 23:38:14 +0100 Subject: view/renderer/Renderer: remove dead code --- src/view/renderer/Renderer.ts | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'src') diff --git a/src/view/renderer/Renderer.ts b/src/view/renderer/Renderer.ts index 6e3897d..f2f72a6 100644 --- a/src/view/renderer/Renderer.ts +++ b/src/view/renderer/Renderer.ts @@ -64,37 +64,4 @@ export default class Renderer { this.gl.uniform2f(this.shaders.translateLoc, -5.0, -5.0); } - - private getAttribLocation(program: WebGLProgram, name: string): number { - const ret = this.gl.getAttribLocation(program, name); - if (ret < 0) - throw new Error("unable to get location of attribute '" + name + "'"); - - return ret; - } - - private getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation { - const ret = this.gl.getUniformLocation(program, name); - if (!ret) - throw new Error("unable to get location of uniform '" + name + "'"); - - return ret; - } - - private compileShader(type: number, src: string): WebGLShader { - const shader = this.gl.createShader(type); - if (!shader) - throw new Error('Unable to create shader'); - - this.gl.shaderSource(shader, src); - this.gl.compileShader(shader); - - if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) { - const err = this.gl.getShaderInfoLog(shader); - this.gl.deleteShader(shader); - throw new Error('Unable to compile shader: ' + err); - } - - return shader; - } } -- cgit v1.2.3