I am currently having problems with my texture loading using the PVR SDK. I know that both of my textures have a linear sample filter. However it fires my message that I have set if a texture load fails. This is how I load my textures in.
const unsigned int NoTex = 3;
// PVR texture files
const char* const TextureFile[NoTex] =
{ "n_Map1.pvr",
"DUDV_map.pvr",
"Skybox.pvr"};
and here is my method to load in the textures
bool OGLES2Skybox2::LoadTextures(CPVRTString* const pErrorStr)
{
for(int i = 0; i < 2; ++i)
{
if(PVRTTextureLoadFromPVR(TextureFile[i], &TextureID[i]) != PVR_SUCCESS){
*pErrorStr = CPVRTString("ERROR: Could not open texture file ") + TextureFile[i];
return false;
}
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
}
// Load cube maps
if(PVRTTextureLoadFromPVR(TextureFile[2], &TextureID[2]))
{
*pErrorStr = CPVRTString("ERROR: Could not open texture file ") + TextureFile[2];
return false;
}
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
return true;
}
and after I call LoadTextures in my initView method()
bool OGLES2Skybox2::InitView()
{
// Sets the clear colour
glClearColor(0.6f, 0.8f, 1.0f, 1.0f);
// Enables depth test using the z-buffer
glEnable(GL_DEPTH_TEST);
CPVRTString ErrorStr;
/*
Load textures
*/
if(!LoadTextures(&ErrorStr))
{
PVRShellSet(prefExitMessage, ErrorStr.c_str());
return false;
}
...
}
Sorry my fault. The reason was that I used the PVR FileWrap tool and since the content was already binded to the application and had automatically generated a .cpp file I had forgot to add the .cpp's back into the project.