Hi Paul,
Thanks for replying.
Yes, texData is defined as gl::TextureData texData;
This whole exercise is part of trying to port SecondStory’s ofHAPplayer to cinder so the compressed file is basically HAP sample files that you can download from Renderheads website (HAP file and HAP with alpha).
I can imagine that trying to write a code to read those files etc. would be too much work for you to help me out, so if I can provide a compressed file for you in any other (and easier) way let me know. I would be happy to.
However, it’s quite possible that I might have missed out on ‘loading the compressed data into the texture’. Can you please be more specific?
What I mean is that in my code there is no data read yet until glGetTexLevelParameteriv
function. This happens a bit later where:
player->getPixels( mSurface->getData() ); //this is where we read pixels from memory buffer
glCompressedTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, mTexFormat, dataLength, mSurface->getData());
And glCompressedTexSubImage2D
function also returns GL_INVALID_OPERATION even though all the parameters are correct and that mSurface->getData() looks correct as well.