| 1 |
118 Weakness in internal handling of multiple implicit references to |
| 2 |
the same texture. |
| 3 |
|
| 4 |
When reading multiple SoTexture2 nodes (and ditto for SoTexture3, |
| 5 |
presumably) referencing the same texture, as in this example: |
| 6 |
|
| 7 |
--------8<------------- [snip] --------------8<------------- [snip] |
| 8 |
#Inventor V2.1 ascii |
| 9 |
|
| 10 |
Separator { |
| 11 |
Texture2 { filename "dirt_Mossy.jpg" } |
| 12 |
Cube { } |
| 13 |
} |
| 14 |
Separator { |
| 15 |
Texture2 { filename "dirt_Mossy.jpg" } |
| 16 |
Cube { } |
| 17 |
} |
| 18 |
--------8<------------- [snip] --------------8<------------- [snip] |
| 19 |
|
| 20 |
...the texture occupies n times the memory it need to do. This is |
| 21 |
a common way to (mis-)layout Inventor and VRML files, so we should |
| 22 |
really fix this so identical textures are shared. |
| 23 |
|
| 24 |
This should be possible to do by fixing SbImage so it implicitly |
| 25 |
shares the textures "behind the scenes". We then need to implement |
| 26 |
a copy-on-write scheme for when to "split" a texture to two |
| 27 |
instances, as textures can be modified programmatically after |
| 28 |
import. |
| 29 |
|
| 30 |
I believe I have read in their release notes or other |
| 31 |
documentation that TGS has implemented this for their Inventor |
| 32 |
implementation. |
| 33 |
|
| 34 |
This is a low-to-medium priority issue. |
| 35 |
|
| 36 |
20040624 mortene. |