Download not possible for this pixelbuffer type

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
yaxinhoo
Gremlin
Posts: 173
Joined: Sun Jun 06, 2010 4:34 pm

Download not possible for this pixelbuffer type

Post by yaxinhoo »

i want to save the texture to file on ios4 "Tex->writeContentsToFile(p)" but i got the except .
any one know how to slove it ? or i can use another way to do it .

Code: Select all

    void GLESHardwarePixelBuffer::download(const PixelBox &data)
    {
        OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
                    "Download not possible for this pixelbuffer type",
                    "GLESHardwarePixelBuffer::download");
    }
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Download not possible for this pixelbuffer type

Post by masterfalcon »

Framebuffers do not have read access in GL ES. Are you trying to save a single texture or the whole screen?
yaxinhoo
Gremlin
Posts: 173
Joined: Sun Jun 06, 2010 4:34 pm

Re: Download not possible for this pixelbuffer type

Post by yaxinhoo »

i want to save the whole scene, not overlay
i saw the ogre src , gles2 can't too . why ?
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Download not possible for this pixelbuffer type

Post by masterfalcon »

Same restriction on reading back frame buffers. The reasoning behind it is performance. I did just fix copyContentsToMemory for GLES2, and should do GLES 1 in 1.8 as well. You could render without overlays, take the shot and then reenable overlays.
yaxinhoo
Gremlin
Posts: 173
Joined: Sun Jun 06, 2010 4:34 pm

Re: Download not possible for this pixelbuffer type

Post by yaxinhoo »

i try it in gles , but i got unsupporte pixelsformat , the sugess pf is pf_B8G8R8.. in the following code why BGR return zero ?

Code: Select all

#if OGRE_ENDIAN == OGRE_ENDIAN_BIG
            // Formats are in native endian, so R8G8B8 on little endian is
            // BGR, on big endian it is RGB.
            case PF_R8G8B8:
                return GL_RGB;
            case PF_B8G8R8:
                return 0;
#else
            case PF_R8G8B8:
                return GL_RGB;
            case PF_B8G8R8:
                return 0;
#endif
yaxinhoo
Gremlin
Posts: 173
Joined: Sun Jun 06, 2010 4:34 pm

Re: Download not possible for this pixelbuffer type

Post by yaxinhoo »

then i use PF_B8G8R8A8 replace it . the target is success to save , but the picture which i save it 's empty. why ?
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Download not possible for this pixelbuffer type

Post by masterfalcon »

I haven't updated the code in 1.8 for GLES 1 yet