Can I load OGL_RGB_888, OGL_RGB_555 PVRs with glCompressedTexImage2D on iPhone?

I can load perfectly PVRTC2 and PVRTC4 files. I modified my code to accept
OGL_RGB_888,OGL_RGB_555,OGL_RGB_565 and OGL_RGBA_8888 but it does not work. (I only see a white rectangle)
Am I doing something wrong or is this not possible on the iPhone.

I created 6 textures with PVRTexToolGUI and I cannot load the last four.
What do you think?
Is anyone loading OGL_RGB_565 PVR files on his code? (for example)

Are you calling glError() to see if it's complaining? I would guess it's giving you an invalid enum error.

While not on the iPhone, I have loaded non-32bit textures before. I'm pretty sure that you just need to find out what parameters to use. It's important to note that there is an internal format (how it's stored in video memory) and the format you are supplying it in. I think in GL ES, they must match as it won't convert it for you.

Skorche Wrote:Are you calling glError() to see if it's complaining? I would guess it's giving you an invalid enum error.

While not on the iPhone, I have loaded non-32bit textures before. I'm pretty sure that you just need to find out what parameters to use. It's important to note that there is an internal format (how it's stored in video memory) and the format you are supplying it in. I think in GL ES, they must match as it won't convert it for you.

I added that code and after glTexImage2D, glError is 1282, which seems is GL_INVALID_OPERATIO.
I also added what you said about types GL_UNSIGNED_SHORT_4_4_4_4 (It seems I didn't read that part, I was pretty sure it was strange use only GL_UNSIGNED_BYTE)

Thanks a lot for your suggestions.

I read on docs about GL_INVALID_OPERATION:

1) GL_INVALID_OPERATION is generated if internalformat and format are not the same.
2) GL_INVALID_OPERATION is generated if type is GL_UNSIGNED_SHORT_5_6_5 and format is not GL_RGB.
3) GL_INVALID_OPERATION is generated if typeis one of GL_UNSIGNED_SHORT_4_4_4_4, or GL_UNSIGNED_SHORT_5_5_5_1 and formatis not GL_RGBA.

In ES, the sized formats like GL_RGBA4_OES are only valid for glRenderBufferStorage. Those sized format enums are defined by OES_framebuffer_object, and are not part of core ES1.1. Yes, this means the internalformat argument to TexImage is basically useless in ES.

In ES, the sized formats like GL_RGBA4_OES are only valid for glRenderBufferStorage. Those sized format enums are defined by OES_framebuffer_object, and are not part of core ES1.1. Yes, this means the internalformat argument to TexImage is basically useless in ES.