Home > other > O know the details of DX9 loading texture memory ups and downs
O know the details of DX9 loading texture memory ups and downs
Time:09-17
Use D3DXCreateTextureFromFileEx loading a 10000 x 7000 pixel image, did the application memory 1 g left after finished loading then fall back to about 100 m, this is what ah=-=, do a 32-bit game, if a background image can be up to 1 gb of memory is really scared
CodePudding user response:
10000 * 7000 is too big, too
CodePudding user response:
10000 * 1024=67 m/7000/1024 In view of the pitch may be greater than the pixel wide, so should be around 100 m normal Memory, up to 1 g if you exclude program reason, image format might be the problem, the process of decompression room for temporary Generally no big problem, if you want to control, can read image data to a file, first to create texture, then lock pixels to Have you so big of texture should be static, memory pool had better not use managed, don't keep a copy in memory