hi all, running into a strange problem changing contents of a material in SceneKit
we are putting a placeholder image into a material content then changing it later when we get the real image from the net
it works most of the time but fails randomly (the image seems to be changed in the material when i log out the description, but the display does not reflect this change)
do i need to do this on some particular thread (i tried main thread, still fails randomly). is there some sort of refresh i have to call in scene kit if a material contents image changes?
anyone else see this (or not see it, as the case may be)
by random like 1 in 5 times maybe? so often enough to be a noticable bug.
SCNMaterial* material;
@weakify(material)
materialweak.diffuse.contents = placeholderimage; // UIImage
// later, after image loads from internet:
materialweak.diffuse.contents = image; // some UIImage
// above line mostly works, but fails randomly (e.g. change not seen on screen).
we are putting a placeholder image into a material content then changing it later when we get the real image from the net
it works most of the time but fails randomly (the image seems to be changed in the material when i log out the description, but the display does not reflect this change)
do i need to do this on some particular thread (i tried main thread, still fails randomly). is there some sort of refresh i have to call in scene kit if a material contents image changes?
anyone else see this (or not see it, as the case may be)
by random like 1 in 5 times maybe? so often enough to be a noticable bug.
SCNMaterial* material;
@weakify(material)
materialweak.diffuse.contents = placeholderimage; // UIImage
// later, after image loads from internet:
materialweak.diffuse.contents = image; // some UIImage
// above line mostly works, but fails randomly (e.g. change not seen on screen).