coin: Coin warning in Sblmage::readFile():The simage library is not available, can not import any images from disk.

When I tried to use an image as a background image, the program warned me that I could not read the image, and a dialog box popped up as shown in the issue。 SoImage* img = new SoImage; img->vertAlignment = SoImage::HALF; img->horAlignment = SoImage::CENTER; img->filename = "D:/demo/project3/background.jpg"; sep->addChild(img);

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

@xiaomx32 The background color of the SoWinExaminerViewer is not part of the scene graph. The offscreen renderer is only applied to the scene graph. That’s why you need to explicitely set the color to the offscreen renderer instance.

I made it, offscreenRenderer.setBackgroundColor(SbColor((float)(226 / 255.0), (float)(225 / 255.0), (float)(228 / 255.0))); and this is the second time you’ve helped me. Thank you very much.