Source
static int getWebglIndex(int bitmapDataChannel) { if (bitmapDataChannel & BitmapDataChannel.RED != 0) return 0; if (bitmapDataChannel & BitmapDataChannel.GREEN != 0) return 1; if (bitmapDataChannel & BitmapDataChannel.BLUE != 0) return 2; if (bitmapDataChannel & BitmapDataChannel.ALPHA != 0) return 3; throw new ArgumentError("Invalid bitmapDataChannel"); }