Following my initial and first problem with PVRTexTool here: PVRTexLib in C# (with C++ tests)
I come across another problem separate to the one linked above.
I try to transcode an image from RGBA8888 to R8. This has no special meaning and is meant to serve as an example for me to learn how I set up the transcoder options.
I currently set up my options like this:
PVRTexLib_TranscoderOptions* CreateOptions()
{
auto options = new PVRTexLib_TranscoderOptions();
options->sizeofStruct = 0x2c;
options->doDither = false;
options->colourspace = PVRTexLibColourSpace::PVRTLCS_Linear;
options->maxRange = 1;
options->pixelFormat = PVRTexLibPixelFormat::R8;
options->quality = PVRTexLibCompressorQuality::PVRTLCQ_PVRTCHigh;
options->channelType[0] = { PVRTexLibVariableType::PVRTLVT_UnsignedByte };
options->channelType[1] = { PVRTexLibVariableType::PVRTLVT_UnsignedByte };
options->channelType[2] = { PVRTexLibVariableType::PVRTLVT_UnsignedByte };
options->channelType[3] = { PVRTexLibVariableType::PVRTLVT_UnsignedByte };
return options;
}
The PixelFormat R8 is setup as the value 0x0000000861626772, which defines the rgba encoding, where only the R channel is defined with 8 bits. This could already be a potential problem in why the Transcode may fail.
I would like someone to tell me if the options are correctly set up like this on first glance. I will reply with my full sample application code.