% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/viewer.R
\name{cgv_run}
\alias{cgv_run}
\title{Run the Viewer Event Loop}
\usage{
cgv_run(viewer, n_frames = 0L)
}
\arguments{
\item{viewer}{External pointer returned by \code{cgv_viewer}.}

\item{n_frames}{Maximum number of frames to render. \code{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,
  \code{n_frames = 0}) or until exactly \code{n_frames} frames have
  been rendered (scripted/offscreen mode). Returns \code{NULL} invisibly.
}
\description{
Starts the rendering loop.
}
