title: rmarkdown::render does not render an rgl::plot3d figure (but Knit button does!)
body: <p>Consider the following example:</p>
  <pre><code>       ---
         title: &quot;Untitled&quot;
         output:
           pdf_document: default
         ---
  
         ```{r, setup}
         Sys.setenv(CHROMOTE_CHROME = &quot;C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe&quot;)
         options(rgl.useNULL = TRUE)
         rgl::setupKnitr()
         ```
  
         Plot:
  
         ```{r, rgl = TRUE, dev = &quot;png&quot;}
         rgl::plot3d(rnorm(10), rnorm(10), rnorm(10))
         ```
  </code></pre>
  <p>Running <code>rmarkdown::render(&quot;temp.Rmd&quot;, output_format = &quot;pdf_document&quot;)</code> produces a PDF with no figure. Even more interestingly, hitting the Knit button in RStudio produces a perfect PDF! (Which is quite strange itself; I was under the impression that the Knit button is exactly the same as the above call.)</p>