getParameter method
Implementation
int getParameter(int key) {
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
];
if (_intValues.contains(key)) {
dynamic val = _gl.getParameter(key);
if(val is List<int>){
return ByteData.view(Uint8List.fromList(val).buffer).getUint32(0);
}
return val;
}
else {
return key;
//throw (" OpenGL getParameter key: ${key} is not support ");
}
}