vsg-dev/vsgExamples

vsgscreenshot generates an empty image after setting offscreen window extents as display

Closed this issue · 1 comments

dov commented

To reproduce:

  1. Run vsgoffscreenshot 3DBenchy.stl (or any other 3D model)
  2. Press 's'.
  3. Run vsgconv and view the resulting screenshot.vsgt . Verify that it the image contains the silhouette of the 3D model
  4. Slightly resize window and press 'e' followed by 's'
  5. Run vsgconv and view the resulting screenshot.vsgt. Observe that it is empty, i.e. all pixels are fully transparent.

The reason for this failure is replaceChild() which expects the prevCaptureCommands to be a direct child of of offscreenCommandGraph. However, there is the offscreenSwitch node placed between them and therefore replaceChild never replaces captureCommands.

dov commented

Fixed in PR #336