- static PixelFormat base_formats[4] = { RED, RG, RGB, RGBA };
- base = base_formats[o&3];
- if(size==3)
- ++size;
+ static PixelComponents components[4] = { RED, RG, RGB, RGBA };
+ static DataType types[4] = { UNSIGNED_BYTE, UNSIGNED_SHORT, HALF_FLOAT, FLOAT };
+ comp = components[o&3];
+ type = types[(o>>2)&3];