Skip to content

VR: Resolve "Not rendered" warnings after XR RenderWindow Initialization

This commit addresses warnings in the OpenXR rendering pipeline that occurred immediately after initialization. In such cases, when the XrFrameState.shouldRender property, used to set the ShouldRenderCurrentFrame flag, evaluates to False, we eliminate explicit use of the vtkWarningMacro.

This prevents warnings like the following from being reported after a standard pipeline initialization:

Warning: In vtkOpenXRRenderWindow.cxx, line 189
vtkOpenXRRenderWindow (0000028A641868D0): Not rendered

This resolves issue #19112 (closed) (OpenXR Renderer: always warn "Not rendered" at startup). Additionally, the associated docstring for the ShouldRenderCurrentFrame instance variable has been updated for clarity.

Furthermore, the flag "ShouldRenderCurrentFrame" is proactively reset to avoid any attempted rendering if the function WaitAndBeginFrame(), used in vtkOpenXRRenderWindow::Render, exits prematurely.

For more details on XrFrameState and XrFrameBeginInfo, refer to the OpenXR specification:

Closes #19112 (closed)

Merge request reports