Closed andreped closed 2 years ago
As discussed, having the m_colorsModified was important. I therefore reverted the changes. In the end, the only edits I did were to use setModified(true)
and updating the flag m_colorsModified=true
when setColor.
Tested again in FP for Windows, and works well for low-res, high-res and bounding box.
I believe this used to work before SegmentationRenderer and SegmentationPyramidRenderer were merged. Perhaps it is due to the introduction (?) of SegmentationLabelRenderer, which I was not aware of.
Anyways, AFAIK, the correct way of setting colors such that they can be properly updated later on, is to use
setModified(true)
. I believe you have told me that having a "local" m_colorsModified is not ideal, as one should use the setModified method, which is used for all other POs, instead.However, for the
createColorUniformBufferObject
I wasn't sure if it was correct to simply remove that if-statement. Maybe this function will be run redundantly in other classes? Currently it is only being used in the BoundingBoxRenderer and the SegmentationRenderer.Anyway, I tested this fix on FastPathology (Windows) and it seems to work well, both for low-res and high-res. But would be nice to know if I should do something else regarding the
createColorUniformBufferObject
method.EDIT: I just tested for bounding boxes as well, and that works!