Change getUid return type from number to string

This commit is contained in:
Frederic Junod
2018-10-17 08:58:50 +02:00
parent a85099a36b
commit 041836c645
33 changed files with 78 additions and 92 deletions
+3 -3
View File
@@ -112,7 +112,7 @@ class WebGLContext extends Disposable {
bindBuffer(target, buf) {
const gl = this.getGL();
const arr = buf.getArray();
const bufferKey = String(getUid(buf));
const bufferKey = getUid(buf);
if (bufferKey in this.bufferCache_) {
const bufferCacheEntry = this.bufferCache_[bufferKey];
gl.bindBuffer(target, bufferCacheEntry.buffer);
@@ -139,7 +139,7 @@ class WebGLContext extends Disposable {
*/
deleteBuffer(buf) {
const gl = this.getGL();
const bufferKey = String(getUid(buf));
const bufferKey = getUid(buf);
const bufferCacheEntry = this.bufferCache_[bufferKey];
if (!gl.isContextLost()) {
gl.deleteBuffer(bufferCacheEntry.buffer);
@@ -204,7 +204,7 @@ class WebGLContext extends Disposable {
* @return {WebGLShader} Shader.
*/
getShader(shaderObject) {
const shaderKey = String(getUid(shaderObject));
const shaderKey = getUid(shaderObject);
if (shaderKey in this.shaderCache_) {
return this.shaderCache_[shaderKey];
} else {