From: atani <at...@at...> - 2005-11-28 15:58:54
|
On Nov 28, 2005, at 7:35 AM, Sam Steele wrote: > > We can probably copy the data out of VRAM and back into the texture > object when you lock the canvas, and copy it back in / release the > RAM when you unlock it. I am not sure the copy is needed. Currently we have two blocks of memory allocated for a texture, one in the original form (as loaded from image file) and one in ARGB8888 form. Both of these are in RAM not VRAM. Currently in lock/unlock we use the "original" texture data and reconvert it to ARGB8888 on unlock. For Palette based textures though, the original form is required to ensure proper color mapping. It would be very slow to process the ARGB8888 data back to palette data and then diff it to "current palette" to get the new values. Mike |