| 228 | |
| 229 | |
| 230 | ILubyte iCompFormatToBpp(ILenum Format) |
| 231 | { |
| 232 | //non-compressed (= non-FOURCC) codes |
| 233 | if (Format == PF_LUMINANCE || Format == PF_LUMINANCE_ALPHA || Format == PF_ARGB) |
| 234 | return Head.RGBBitCount/8; |
| 235 | |
| 236 | //fourcc formats |
| 237 | else if (Format == PF_RGB || Format == PF_3DC || Format == PF_RXGB) |
| 238 | return 3; |
| 239 | else if (Format == PF_ATI1N) |
| 240 | return 1; |
| 241 | //else if (Format == PF_R16F) |
| 242 | // return 2; |
| 243 | else if (Format == PF_A16B16G16R16 || Format == PF_A16B16G16R16F |
| 244 | || Format == PF_G32R32F) |
| 245 | return 8; |
| 246 | else if (Format == PF_A32B32G32R32F) |
| 247 | return 16; |
| 248 | else //if (Format == PF_G16R16F || Format == PF_R32F || dxt) |
| 249 | return 4; |
| 250 | } |
| 251 | |
| 252 | |
| 253 | ILubyte iCompFormatToBpc(ILenum Format) |
no outgoing calls
no test coverage detected