| 289 | } |
| 290 | |
| 291 | int CMP_CDECL SetChannelWeightsBC1(void* options, CGU_FLOAT WeightRed, CGU_FLOAT WeightGreen, CGU_FLOAT WeightBlue) |
| 292 | { |
| 293 | if (!options) |
| 294 | return CGU_CORE_ERR_INVALIDPTR; |
| 295 | CMP_BC15Options* BC15optionsDefault = (CMP_BC15Options*)options; |
| 296 | |
| 297 | if ((WeightRed < 0.0f) || (WeightRed > 1.0f)) |
| 298 | return CGU_CORE_ERR_RANGERED; |
| 299 | if ((WeightGreen < 0.0f) || (WeightGreen > 1.0f)) |
| 300 | return CGU_CORE_ERR_RANGEGREEN; |
| 301 | if ((WeightBlue < 0.0f) || (WeightBlue > 1.0f)) |
| 302 | return CGU_CORE_ERR_RANGEBLUE; |
| 303 | |
| 304 | BC15optionsDefault->m_bUseChannelWeighting = true; |
| 305 | BC15optionsDefault->m_fChannelWeights[0] = WeightRed; |
| 306 | BC15optionsDefault->m_fChannelWeights[1] = WeightGreen; |
| 307 | BC15optionsDefault->m_fChannelWeights[2] = WeightBlue; |
| 308 | return CGU_CORE_OK; |
| 309 | } |
| 310 | |
| 311 | int CMP_CDECL SetSrgbBC1(void* options, CGU_BOOL sRGB) |
| 312 | { |