Wittner, Ben, Ph.D.
2016-Jan-11 15:55 UTC
[R-sig-Fedora] rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7
Dear R-SIG-Fedora, I'm finding that on CentOS 7, rgl.snapshot (a function in the R package rgl, which provides an R interface to the OpenGL 3-d graphics library) only captures a small portion what's visible in the RGL device window. This does not happen with the same R and rgl versions on CentOS 5.3 (see details below). The maintainer of rgl, Duncan Murdoch, responded (see below) that the rgl code has not changed in a long time, so it's likely, although not certain, that the problem lies with CentOS 7. I know very little about graphics, but it seems to me from looking at the rgl source code that the fundamental work of rgl.snapshot is done by calls to glReadBuffer, glPixelStorei, and glReadPixels, which seem to be functions in the OpenGL library. Can anyone take a look at this or advise me on how to proceed? Thanks very much in advance. -Ben -----Original Message----- From: Duncan Murdoch [mailto:murdoch.duncan at gmail.com] Sent: Friday, January 08, 2016 8:13 PM To: Wittner, Ben, Ph.D.; r-help at r-project.org Subject: Re: [R] rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7 On 08/01/2016 4:13 PM, Wittner, Ben, Ph.D. wrote:> Hello, > > As an example, I ran the following code: > > library("rgl") > example(plot3d) > rgl.snapshot("test.png") > > The full plot is visible in the window titled RGL device 1 [Focus], > but only a small portion of the upper left part of the plot is visible > in test.png (see attached test.png, if the list server attaches it. > Otherwise, email me if you like and I'll send it directly to you.) > > The output of sessionInfo() is as follows: > > R version 3.2.3 (2015-12-10) > Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 > (Core) > > locale: > [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C > [3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8 > [5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8 > [7] LC_PAPER=en_US.utf8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] rgl_0.95.1441 > > loaded via a namespace (and not attached): > [1] tools_3.2.3 > > In addition to the CentOS 7 machine, I have a CentOS 5.3 machine, which has R 3.0.2 and rgl 0.93.996. I tried the code above on it and it captured the full window in the output of rgl.snapshot (i.e., it worked properly). > > To see whether the difference could be attributed to the CentOS version or the R/rgl version, I put R 3.0.2 with rgl 0.93.996 on the CentOS 7 machine and ran the code above. As with the earlier CentOS 7 run, only a small portion of the plot was visible in the output of rgl.snapshot. So it seems the difference is due to a difference in the CentOS versions and not the R/rgl versions. > > Thanks in advance for any help. >I think you'll need to contact CentOS about this. That code hasn't changed in rgl in a long time. It's possible that rgl is wrong, but I'd need more information from them to convince me. Duncan Murdoch The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: test.png Type: image/png Size: 968 bytes Desc: test.png URL: <https://stat.ethz.ch/pipermail/r-sig-fedora/attachments/20160111/ddb795d6/attachment.png>
Tom Callaway
2016-Jan-11 16:04 UTC
[R-sig-Fedora] rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7
On 01/11/2016 10:55 AM, Wittner, Ben, Ph.D. wrote:> Dear R-SIG-Fedora, > > I'm finding that on CentOS 7, rgl.snapshot (a function in the R package rgl, which provides an R interface to the OpenGL 3-d graphics library) only captures a small portion what's visible in the RGL device window. This does not happen with the same R and rgl versions on CentOS 5.3 (see details below). > > The maintainer of rgl, Duncan Murdoch, responded (see below) that the rgl code has not changed in a long time, so it's likely, although not certain, that the problem lies with CentOS 7. > > I know very little about graphics, but it seems to me from looking at the rgl source code that the fundamental work of rgl.snapshot is done by calls to glReadBuffer, glPixelStorei, and glReadPixels, which seem to be functions in the OpenGL library. > > Can anyone take a look at this or advise me on how to proceed?Are you using the EPEL R 3.2.3 builds? What version of Centos 7? 7.2? Is the NVIDIA driver in play? What version of the NVIDIA driver are you using? ~tom =Red Hat
Wittner, Ben, Ph.D.
2016-Jan-11 18:24 UTC
[R-sig-Fedora] rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7
Dear Tom, Thank you very much for thinking about this. Please see my replies below. -Ben> Are you using the EPEL R 3.2.3 builds?I'm not sure what the question means, but I'm pretty sure the answer is no. I know I built the versions of R I used from source code (i.e., ./configure followed by make).> What version of Centos 7? 7.2?[bwittner at kagoshima ~]$ cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) [bwittner at kagoshima ~]$ rpm -q centos-release centos-release-7-2.1511.el7.centos.2.10.x86_64 [bwittner at kagoshima ~]$ uname -rmi 3.10.0-327.3.1.el7.x86_64 x86_64 x86_64> Is the NVIDIA driver in play?I think so. When I execute the command lspci -v, the only block that has mention of VGA is the following: 07:00.0 VGA compatible controller: NVIDIA Corporation G84GL [Quadro FX 370] (rev a1) (prog-if 00 [VGA controller]) Subsystem: NVIDIA Corporation Device 0491 Flags: bus master, fast devsel, latency 0, IRQ 42 Memory at df000000 (32-bit, non-prefetchable) [size=16M] Memory at c0000000 (64-bit, prefetchable) [size=256M] Memory at dc000000 (64-bit, non-prefetchable) [size=32M] I/O ports at dc00 [size=128] Expansion ROM at defe0000 [disabled] [size=128K] Capabilities: <access denied> Kernel driver in use: nouveau> What version of the NVIDIA driver are you using?Since the output of lspci above said "Kernel driver in use: nouveau", I executed the command modinfo nouveau, getting the following output: filename: /lib/modules/3.10.0-327.3.1.el7.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko license: GPL and additional rights description: nVidia Riva/TNT/GeForce/Quadro/Tesla author: Nouveau Project rhelversion: 7.2 srcversion: C131306B4DEC7AB88BC647D alias: pci:v000012D2d*sv*sd*bc03sc*i* alias: pci:v000010DEd*sv*sd*bc03sc*i* depends: drm,drm_kms_helper,ttm,mxm-wmi,i2c-core,wmi,video,i2c-algo-bit intree: Y vermagic: 3.10.0-327.3.1.el7.x86_64 SMP mod_unload modversions signer: CentOS Linux kernel signing key sig_key: 3D:4E:71:B0:42:9A:39:8B:8B:78:3B:6F:8B:ED:3B:AF:09:9E:E9:A7 sig_hashalgo: sha256 parm: tv_norm:Default TV norm. Supported: PAL, PAL-M, PAL-N, PAL-Nc, NTSC-M, NTSC-J, hd480i, hd480p, hd576i, hd576p, hd720p, hd1080i. Default: PAL *NOTE* Ignored for cards with external TV encoders. (charp) parm: vram_pushbuf:Create DMA push buffers in VRAM (int) parm: nofbaccel:Disable fbcon acceleration (int) parm: tv_disable:Disable TV-out detection (int) parm: ignorelid:Ignore ACPI lid status (int) parm: duallink:Allow dual-link TMDS (default: enabled) (int) parm: pstate:enable sysfs pstate file, which will be moved in the future (int) parm: config:option string to pass to driver core (charp) parm: debug:debug string to pass to driver core (charp) parm: noaccel:disable kernel/abi16 acceleration (int) parm: modeset:enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int) parm: runpm:disable (0), force enable (1), optimus only default (-1) (int) parm: agpmode:AGP mode (0 to disable AGP) (int) The information in this e-mail is intended only for the ...{{dropped:11}}
Apparently Analagous Threads
- rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7
- Problem with GT218 (GeForce GT210)
- rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7
- rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7
- rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7