Re: [Rd] R 2.3.0 and rgl on OS X 10.4.6

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Sat 06 May 2006 - 11:03:47 GMT

On 5/5/2006 9:50 PM, Simon Urbanek wrote:
> Neely,
>
> as Duncan was saying R-SIG-Mac is a better place to discuss it.
>
> On May 4, 2006, at 2:08 PM, eatkinso@mdanderson.org wrote:
>

>> I just downloaded and installed R 2.3.0 on my Mac G5 running OS X  
>> 10.4.6. I also updated with R.app revision 3114 as ecommended. Now,  
>> when I attemp to use package rgl
>> I get the error
>>
>>> library(rgl)
>> Error: package 'rgl' is not installed for 'arch=ppc'

>
> This usually means that you have an old package for R 2.2.0 and you
> are trying to use it in R 2.3.0. *)

Oops, sorry about my "more commonly used platform" comment. I thought this was an older Mac platform, not a current one.

>

>> I have tried reinstalling from CRAN using both binary and source.  
>> The source install fails, The binary install yields
>>

>
> AFAIR rgl is currently broken, so there is no binary:
> http://r.research.att.com/reports/tiger-universal/results/2.3.0/html/
> rgl.report.html
> I remember fixing this a while ago - it wasn't as simple as casting,
> because the structures are wrong, but I'll see if I can dig out the fix.

A simple fix for the error shown on that page is in the patch below. (The line numbers don't match because I'm working with an unreleased version.) I'm hoping there will be another release soon; there are some additions to rgl.

Duncan Murdoch

Index: api.cpp


    Device* device = deviceManager->getAnyDevice();

    if ( device ) {

+  	for (int i=0; i<4; i++) viewport[i] = view[i];
    	for (int i=0; i<columns; i++) {
-		gluProject(point[0],point[1],point[2],model,proj,view,
+		gluProject(point[0],point[1],point[2],model,proj,viewport,
  		vertex,vertex+1,vertex+2);
  		vertex[0] /= view[2];
  		vertex[1] /= view[3];

@@ -703,14 +705,16 @@

    int success = RGL_FAIL;
    GLdouble* vertex = point;
    int columns = idata[0];
+ GLint viewport[4];

    Device* device = deviceManager->getAnyDevice();

    if ( device ) {

+    	for (int i=0; i<4; i++) viewport[i] = view[i];
    	for (int i=0; i<columns; i++) {
  	        pixel[0] *= view[2];
  	        pixel[1] *= view[3];
-		gluUnProject(pixel[0],pixel[1],pixel[2],model,proj,view,
+		gluUnProject(pixel[0],pixel[1],pixel[2],model,proj,viewport,
  		vertex,vertex+1,vertex+2);
  		pixel += 3;
  		vertex += 3;

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat May 06 21:14:26 2006

This archive was generated by hypermail 2.1.8 : Sat 06 May 2006 - 12:18:03 GMT