cgv_run: Run the Viewer Event Loop

View source: R/viewer.R

cgv_runR Documentation

Run the Viewer Event Loop

Description

Starts the rendering loop.

Usage

cgv_run(viewer, n_frames = 0L)

Arguments

viewer

External pointer returned by cgv_viewer.

n_frames

Maximum number of frames to render. 0 (default) means run until the window is closed (interactive mode). A positive value renders exactly that many frames and returns — useful for smoke tests and scripted rendering on machines with a display.

Value

No return value, called for side effects: drives the render loop. Blocks until the window is closed (interactive mode, n_frames = 0) or until exactly n_frames frames have been rendered (scripted/offscreen mode). Returns NULL invisibly.


cgvR documentation built on May 12, 2026, 1:06 a.m.