I have been looking into using this function and I had a question. It looks like the API requires that the image you are submitting as a replacement must be a contiguous piece of memory. In other words if you have 512x512 texture and you want to replace a 200x200 peice of it, you must have the image data in 4200200 array of bytes (including alpha).
This makes it pretty expensive to use since we would have to create temporary buffers to hold that. What I would like to do is update a portion of the PC memory copy of the texture and then transfer that portion into texture on the 3d card. But it looks like I would have to create a buffer, copy the data from the PC memory image into the buffer and then update the texture with the buffer. That copy is going to be expensive, and the buffer memory is going to hurt also.
Am I understanding the interface properly? Any suggestions on how I can make this perform well?
What I thought would be nice is to expose several functions on the ImageComponent2D. One would take an array of “dirty” rectangles of the main image which would result in the subimages being moved over on the next frame, sourced by the image components memory buffer. One would take an image and would move that over on the next frame, sourced by the supplied image.
