Delayed material textures in Rendered display mode

I noticed that when my plugin creates a textured material and assigns it to an object, the texture is displayed (in Rendered display) with a small delay. It is less than a second but quite notorious at first glance. During that short interval, the object looks white.

I guess the textures are loaded in the background and, once loaded, the display is invalidated to force a redraw. Is that right? Have this changed compared to Rhino 8?

It is affecting the plugin because it creates an image by capturing the frame buffer of an offscreen display pipeline. And the captured image shows white objects…

Is there a way to ensure all textures are loaded before capturing the frame buffer?

It looks like Rhino 9 is creating a temporary texture file of just one white pixel and uses it until the real texture file is loaded. It seems to be happening only for large image files (512+ pixels)

@andy - when you have time can you review?