I try to make RGB8888-format image to PVRTC4bit-format image.
Then, I prepared the "PVRTextureHeaderV3" and the data of RGB8888-format image,
and converted it by CPVRTCTexture(CPVRTextureHeader& sHeader, void* pData).
But, when constructoring of CPVRTCTexture, the program hung up.
The odd thing is that there are some conditions of hangup as below.
1. VStudio-Debug Mode && MipMapLevel = more than 1(only 1 is OK) && ImageWidth or Height = 512 and more(256 and less is OK)
2. VStudio-Release Mode(I don't know if any other condition is involved)
I wait for some advises.
For reference, I write the source code and the environment.
SDK : OpenglES v2.10 for windows x86 emulation, PC:Windows XP 32bit (memory is enough)
IDE : Visual Studio 2008(using MFC)
Source Code:
unsigned char* l_pImageData[WIDTH*HEIGHT*4]; //pixel values are set
//Making of Header
PVRTextureHeaderV3 l_cHeader;
l_cHeader.u32Version = PVRTEX3_IDENT; //Version
l_cHeader.u32Flags = PVRTEX3_PREMULTIPLIED; //Flags
l_cHeader.u64PixelFormat = PVRStandard8PixelType.PixelTypeID; //PixelFormat
l_cHeader.u32ColourSpace = ePVRTCSpacelRGB; //ColourSpace
l_cHeader.u32ChannelType = ePVRTVarTypeUnsignedByteNorm; //ChannelType
l_cHeader.u32Height = HEIGHT; //Height
l_cHeader.u32Width = WIDTH; //Width
l_cHeader.u32Depth = 1; //Depth
l_cHeader.u32NumSurfaces = 1; //NumSurfaces
l_cHeader.u32NumFaces = 1; //NumFaces
l_cHeader.u32MIPMapCount = 2; //MipMapCount
l_cHeader.u32MetaDataSize = 0; //MetaDataSize
//Create Texture
CPVRTexture l_cOrgTexture(l_cHeader, l_pImageData); <--[hang-up step]