copy part of a texture to another texture

204 views Asked by At

I'm starting to learn about android game programming and came across a problem I haven't found a working solution for so far. Basically I'm trying to draw a tiled background to a texture and then just draw that texture once every frame instead of redrawing all the tiles over an over again. The tiles have been loaded onto another texture.

My problem is that nowhere have i found a way of copying a subtexture to another texture in opengl es 1.1. I have found some info about using extensions and frame buffer objects but so far i have been unable to get it to work.

I was hoping that it would exist a way to get to the texture's pixeldata and then using glTexSubImage2D or similar to fill the background texture...

Any pointers would be appreciated.

Thanks!

0

There are 0 answers