pvrtc

Hello,

I’d like to know if exist any benchmark for .pvr comparind it to other format like png. I’m interested to have some measures on my embedded device (mbx lite) to see if i can imporove my final application performance.

thanks in advance.

Hi,
My conversion to opengles looks to be harder then what i’ve expected. Could any pose a compilable source (with/out PVRTTextureLoadFromPVR()) just to load a pvr image from a file and to display it to screen please ?

thank you.

Hello,
Well, let me explain better my prblem. I have some powervr images to display, they looks perfectly wiel i build against windows, but whel i build the same application witch uses the same data on powerpc with mbx lite :

glClearColor(0.6f, 0.8f, 1.0f, 1.0f);
glEnable(GL_TEXTURE_2D);
string m_inputFiles("/bd00/pvr/nature.pvr");
if(PVRTTextureLoadFromPVR(m_inputFiles.c_str(), &m_ui32Texture[0]) != PVR_SUCCESS)
    {
        printf(“ERROR: Failed to load (%s)n”,m_inputFiles.c_str());

    }

    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );

    const GLfloat squareVertices[] = {
        -1.0, 1.0, 0.0,          
        -1.0, -1.0, -0.0,       
        1.0, -1.0, 0.0,         
        1.0, 1.0, 0.0           
    };
    const GLshort squareTextureCoords[] = {
        0, 1,      
        0, 0,
        1, 0,
        1, 1
    };

    glBindTexture(GL_TEXTURE_2D, m_ui32Texture[0]);
    glEnableClientState(GL_VERTEX_ARRAY);
    glVertexPointer(3, GL_FLOAT, 0, squareVertices);
    glTexCoordPointer(2, GL_SHORT, 0, squareTextureCoords);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    glDrawArrays(GL_TRIANGLE_FAN, 0, 4);

I got an image wich iis rotates 270° and fliped vertically. I expected some endianess problem at the begining but PVRTTextureLoadFromPVR looks to be safe for this purpose. Anyone have an idea ?

Thank you.

Apologies for not answering sooner - I’ve been away at GDC.





PNG textures must be decompressed to 32 bits per pixel before use by the graphics core so there is no runtime advantage in using these textures. PVRTC textures are used by the graphics core as is, so that bandwidth usage and memory footprint benefit from these textures occupying 16x or 8x fewer bytes.





If runtime texture reads are the bottleneck in your rendering path then using PVRTC is always going to be more efficient than PNG. The only advantage to PNG is in disk storage size. Potentially disk access time might be helped due to the smaller file size, but, due to the decompresion step, this may even be wiped out as well.





Regarding the endian problems: which precise platform are you using - is it the MPC5121 platform from Freescale? Would you mind sending your test project to devtech@imgtec.com so we can investigate it here?


Hi,
Thank you for the answer.
PNG is a real problem for me actually, for all the animations i have to play i need more then 1000.
I’m reading the code aagin ana again, but whenever i use
    const GLshort squareTextureCoords[] = {
        0, 1,      
        0, 0,
        1, 0,
        1, 1
    };
the result isnt correct, while when i use GLfloat and glTexCoordPointer(2, GL_FLOAT, 0, squareTextureCoords); the result is displayed correctly on target. I’m happy with it but i’d like to understand why.
Good day.