Whoa, you do not need to duplicate texture data, do your operations with the array and when you want to use a pointer simply get the address of the first element of the array. You're procedure is missing a begin