getParameter method
Implementation
int getParameter(int key) {
startCheck('getParameter');
List<int> _intValues = [
WebGL.MAX_TEXTURE_IMAGE_UNITS,
WebGL.MAX_VERTEX_TEXTURE_IMAGE_UNITS,
WebGL.MAX_TEXTURE_SIZE,
WebGL.MAX_CUBE_MAP_TEXTURE_SIZE,
WebGL.MAX_VERTEX_ATTRIBS,
WebGL.MAX_VERTEX_UNIFORM_VECTORS,
WebGL.MAX_VARYING_VECTORS,
WebGL.MAX_FRAGMENT_UNIFORM_VECTORS,
WebGL.MAX_SAMPLES,
WebGL.MAX_COMBINED_TEXTURE_IMAGE_UNITS,
WebGL.SCISSOR_BOX,
WebGL.VIEWPORT,
WebGL.MAX_TEXTURE_MAX_ANISOTROPY_EXT,
WebGL.MAX_UNIFORM_BUFFER_BINDINGS
];
if (_intValues.indexOf(key) >= 0) {
final v = calloc<Int32>(4);
gl.glGetIntegerv(key, v);
int _v = v.value;
calloc.free(v);
return _v;
} else {
throw (" OpenGL getParameter key: ${key} is not support ");
}
}