Reading texture data from GLES

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
mannam
Halfling
Posts: 45
Joined: Tue Feb 15, 2011 7:23 am

Reading texture data from GLES

Post by mannam »

I know GLES don't have glGetTexImage.

Someone suggests binding the texture to FBO and use glReadPixels to get the data.

How to do this in Ogre? Thanks.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: Reading texture data from GLES

Post by masterfalcon »

If you are using GL ES 2 and Ogre 1.9 you can use GLES2TextureBuffer::download.
mannam
Halfling
Posts: 45
Joined: Tue Feb 15, 2011 7:23 am

Re: Reading texture data from GLES

Post by mannam »

Thanks. But how about Ogre 1.8?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: Reading texture data from GLES

Post by masterfalcon »

Sorry, it's a feature that was added for 1.9. There are no plans to back port it to 1.8. However the code is pretty well contained within that function so you could just copy/paste it from 1.9 if you wish.
mannam
Halfling
Posts: 45
Joined: Tue Feb 15, 2011 7:23 am

Re: Reading texture data from GLES

Post by mannam »

Okay, thank you!
Post Reply