Currently GPU textures are flushed as the image data aren't identical
compared to the previous version in the undo stack.
This patch will clear the attributes that are cleared during loading.
What would make the structures identical. It still has some issues as
the data are still being considered not identical.
Note: contains some debug utilities to view the exact data that is saved
and read.
When enabling IMAGE_UNDO_HEX_DUMP the consoles shows the data in (at
least for me) readable way.
When writing the ID of the image for the undo-stack.
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000020: 00 00 00 00 00 00 00 00 49 4d 62 61 63 6b 67 72 6f 75 6e 64 2d 63 6f 6d 70 72 65 73 73 65 64 2e IMbackground-compressed. 00000040: 6a 70 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 jpg 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 . 00000080: 00 00 00 00 ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 . 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2f 2f 2e 2e 2f 52 65 61 6c 46 69 74 2f 62 6c 65 //../RealFit/ble
When reading the ID back
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000020: 00 00 00 00 00 00 00 00 49 4d 62 61 63 6b 67 72 6f 75 6e 64 2d 63 6f 6d 70 72 65 73 73 65 64 2e IMbackground-compressed. 00000040: 6a 70 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 jpg 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 20 01 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 . 00000080: 00 00 00 00 ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 . 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2f 2f 2e 2e 2f 52 65 61 6c 46 69 74 2f 62 6c 65 //../RealFit/ble
Difference is in the ID struct are:
- recalc (pos 0x78)
- us (pos 0x70)
- tag (pos 0x6b)
Looking at the comments just before these attributes these are cleares at read time...
Might be the issue...