glQuery/glQuery — Issue #6: Use correct tests for determining types of WebGL objects
Author: rehno-lindeque
Created: 2011-12-25 22:28:29+00:00
State: open
Labels: Defect

Currently glQuery uses instanceof to determine types of WebGL objects, however it should be noted that webgl provides explicit tests such as these:

GLboolean isBuffer(WebGLBuffer buffer);
GLboolean isEnabled(GLenum cap);
GLboolean isFramebuffer(WebGLFramebuffer framebuffer);
GLboolean isProgram(WebGLProgram program);
GLboolean isRenderbuffer(WebGLRenderbuffer renderbuffer);
GLboolean isShader(WebGLShader shader);
GLboolean isTexture(WebGLTexture texture);

However these are somewhat inconvenient since they're associated with a specific webgl context