[R] RGL and Windows 7

Duncan Murdoch murdoch.duncan at gmail.com
Fri Oct 1 14:26:17 CEST 2010


  On 01/10/2010 2:12 AM, Sven Wagner wrote:
> Hi!
>
> For saving 3d plots I make use of the "rgl.snapshot" command provided within
> the rgl-Package. So far there was no problem using Windows XP, but under
> Windows 7 the result is a black image, however in the png-format (see
> attachment  http://r.789695.n4.nabble.com/file/n2844487/Koll_perf.png ).
> What can I do? (Reinstalling Windows XP is no alternative. :-) )
>

You don't give any code to reproduce what you did, but the following 
just worked for me on Windows 7:

example(plot3d)
rgl.snapshot("c:/temp/test.png")

The usual reasons rgl.snapshot fails are these:

  - Bugs in your graphics card or its driver.  Try updating the driver.
  - The rgl graphics window being hidden at the time you call 
rgl.snapshot().  Some graphics drivers don't update the buffer if it's 
not visible, so rgl.snapshot() grabs junk.

If you have the problem with my two lines above and neither suggestion 
above fixes it, then I don't know what's going on, and I wouldn't be 
very optimistic you'll be able to fix it.

Duncan Murdoch



More information about the R-help mailing list