Hi,
I’m working on an application where it’s necessary to update sub rectangles of a big master texture. I basically have a software generated image buffer of say 1024x512 where I need to update say 128x64 subrects every now and then.
in OpenGL I can use this code:
char *data = image.data + (x + y * image.width) * 4;
glPixelStorei(GL_UNPACK_ROW_LENGTH, image.width);
glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h, GL_RGBA, GL_UNSIGNED_BYTE, data);
How do I go about doing this in ES efficiently?
All I can think of is to either copy the new data to a temporary buffer and update, or to update it line by line. Neither of these seems very efficient. Is there a better way?
Thanks,
Peter