Running 'bbox3dtests.R' [4s]
  Running 'boundary.R' [1s]
  Running 'indices.R' [158s]
  Running 'testthat.R' [170s]
  Running 'unfixed.R' [160s]
  Running 'userTexture.R' [160s]
  Running 'widgetlighting.R' [2s]
Running the tests in 'tests/indices.R' failed.
Complete output:
  > library(rgl)
  > tet <- tetrahedron3d()
  > 
  > open3d()
  wgl 
    1 
  > segments3d(t(tet$vb[1:3,]), indices = c(1,2,1,3,1,4,2,3,2,4,3,4))
  > 
  > open3d()
  wgl 
    2 
  > text3d(t(tet$vb[1:3,]), text=1:4)
  > triangles3d(t(tet$vb[1:3,]), indices = c(1,2,3,1,4,2,1,3,4,2,4,3),
  +             col = "red")
  > 
  > # This displayed a triangle for the red quad (issue #154)
  > 
  > quad <- cbind(x = c(-1, 1, 1, -1),
  +               y = c( 0, 0, 0, 0),
  +               z = c(-1, -1, 1, 1))/2
  > open3d()
  wgl 
    3 
  > triangles3d(quad, alpha = 0.5, col = "red", indices=c(1,2,3,1,3,4))
  > id <- triangles3d(quad+1, col = "blue", indices=c(1,2,3,1,3,4))
  > 
  > # These signalled errors or warnings
  > 
  > tri <- as.triangles3d(id)
  > m <- as.mesh3d(id)
  > 
  > filename <- tempfile(fileext = ".ply")
  > writePLY(filename)
  > unlink(filename)
  > 
  > filename <- tempfile(fileext = ".obj")
  > writeOBJ(filename, separateObjects = FALSE)
  > readOBJ(filename)
   mesh3d object with 8 vertices, 4 triangles.
  > unlink(filename)
  > 
  > filename <- tempfile(fileext = ".stl")
  > writeSTL(filename)
  > readSTL(filename)
  > unlink(filename)
  > 
  > proc.time()
     user  system elapsed 
     0.48    0.23    0.70 
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > if (require(testthat)) {
  +   library(rgl)
  +   options(rgl.useNULL = TRUE)
  +   test_check("rgl")
  + } else
  + 	warning("'testthat' package is needed for tests")
  Loading required package: testthat
  [ FAIL 0 | WARN 0 | SKIP 0 | PASS 38 ]
  > 
  > proc.time()
     user  system elapsed 
     1.76    0.23    1.98 
Running the tests in 'tests/unfixed.R' failed.
Complete output:
  > library(rgl)
  > mfrow3d(2,2, sharedMouse = TRUE)
  > sprites3d( rnorm(10) + 6, rnorm(10), rnorm(10), shape = shade3d(tetrahedron3d(), col = "red"), rotating = FALSE, fixedSize = FALSE)
  > next3d()
  > sprites3d( rnorm(10) + 6, rnorm(10), rnorm(10), shape = shade3d(tetrahedron3d(), col = "red"), rotating = FALSE, fixedSize = TRUE)
  > next3d()
  > sprites3d( rnorm(10) + 6, rnorm(10), rnorm(10), shape = shade3d(tetrahedron3d(), col = "red"), rotating = TRUE, fixedSize = FALSE)
  > next3d()
  > sprites3d( rnorm(10) + 6, rnorm(10), rnorm(10), shape = shade3d(tetrahedron3d(), col = "red"), rotating = TRUE, fixedSize = TRUE)
  > rglwidget()
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.68    0.35    0.96 
Running the tests in 'tests/userTexture.R' failed.
Complete output:
  > library(rgl)
  > open3d()
  wgl 
    1 
  > set.seed(3)
  >  x <- cube3d(col="white", texture = system.file("textures/rgl2.png",
  +                                                 package = "rgl"),
  +              texcoords = matrix(runif(16), ncol=2))
  > id <- shade3d(x)
  > # rglwidget()
  > 
  > 
  > 
  > vShader <- "
  + /* ****** quads object 13 vertex shader ****** */
  +   #ifdef GL_ES
  +   #ifdef GL_FRAGMENT_PRECISION_HIGH
  +   precision highp float;
  + #else
  + precision mediump float;
  + #endif
  + #endif
  + attribute vec3 aPos;
  + attribute vec4 aCol;
  + uniform mat4 mvMatrix;
  + uniform mat4 prMatrix;
  + varying vec4 vCol;
  + varying vec4 vPosition;
  + attribute vec3 aNorm;
  + uniform mat4 normMatrix;
  + varying vec4 vNormal;
  + attribute vec2 aTexcoord;
  + varying vec2 vTexcoord;
  + void main(void) {
  +   vPosition = mvMatrix * vec4(aPos, 1.);
  +   gl_Position = prMatrix * vPosition;
  +   vCol = aCol;
  +   vNormal = normMatrix * vec4(-aNorm, dot(aNorm, aPos));
  +   vNormal = vec4(normalize(vNormal.xyz/vNormal.w), 1);
  +   vTexcoord = aTexcoord;
  + }
  + "
  > fShader <- "
  + /* ****** quads object 13 fragment shader ****** */
  +   #ifdef GL_ES
  +   #ifdef GL_FRAGMENT_PRECISION_HIGH
  +   precision highp float;
  + #else
  + precision mediump float;
  + #endif
  + #endif
  + varying vec4 vCol; // carries alpha
  + varying vec4 vPosition;
  + varying vec2 vTexcoord;
  + uniform sampler2D uSampler;
  + uniform sampler2D userSampler;
  + uniform int uFogMode;
  + uniform vec3 uFogColor;
  + uniform vec4 uFogParms;
  + varying vec4 vNormal;
  + uniform mat4 mvMatrix;
  + uniform vec3 emission;
  + uniform float shininess;
  + uniform vec3 ambient0;
  + uniform vec3 specular0; // light*material
  + uniform vec3 diffuse0;
  + uniform vec3 lightDir0;
  + uniform bool viewpoint0;
  + uniform bool finite0;
  + void main(void) {
  +   vec4 fragColor;
  +   vec3 n = normalize(vNormal.xyz + texture2D(userSampler, vTexcoord).rgb);
  +   vec3 eye = normalize(-vPosition.xyz/vPosition.w);
  +   vec3 lightdir;
  +   vec4 colDiff;
  +   vec3 halfVec;
  +   vec4 lighteffect = vec4(emission, 0.);
  +   vec3 col;
  +   float nDotL;
  +   n = -faceforward(n, n, eye);
  +   colDiff = vec4(vCol.rgb * diffuse0, vCol.a);
  +   lightdir = lightDir0;
  +   if (!viewpoint0)
  +     lightdir = (mvMatrix * vec4(lightdir, 1.)).xyz;
  +   if (!finite0) {
  +     halfVec = normalize(lightdir + eye);
  +   } else {
  +     lightdir = normalize(lightdir - vPosition.xyz/vPosition.w);
  +     halfVec = normalize(lightdir + eye);
  +   }
  +   col = ambient0;
  +   nDotL = dot(n, lightdir);
  +   col = col + max(nDotL, 0.) * colDiff.rgb;
  +   col = col + pow(max(dot(halfVec, n), 0.), shininess) * specular0;
  +   lighteffect = lighteffect + vec4(col, colDiff.a);
  +   vec4 textureColor = lighteffect*vec4(1.,1.,1.,1.);
  +   fragColor = textureColor;
  +   float fogF;
  +   if (uFogMode > 0) {
  +     fogF = (uFogParms.y - vPosition.z/vPosition.w)/(uFogParms.y - uFogParms.x);
  +     if (uFogMode > 1)
  +       fogF = mix(uFogParms.w, 1.0, fogF);
  +     fogF = fogF*uFogParms.z;
  +     if (uFogMode == 2)
  +       fogF = 1.0 - exp(-fogF);
  +     else if (uFogMode == 3)
  +       fogF = 1.0 - exp(-fogF*fogF);
  +     fogF = clamp(fogF, 0.0, 1.0);
  +     gl_FragColor = vec4(mix(fragColor.rgb, uFogColor, fogF), fragColor.a);
  +   } else gl_FragColor = fragColor;
  + }
  + "
  > 
  > s <- setUserShaders(id, vertexShader = vShader,
  +                         fragmentShader = fShader,
  +                textures = c(userSampler = system.file("textures/rgl2.png",
  +                                       package = "rgl"),
  +                             unusedSampler = system.file("textures/rgl2.png",
  +                                                         package = "rgl")),
  +                uniforms = list(unusedUniform = 3),
  +                attributes = list(unusedAttribute = 1:10))
  > rglwidget(s)
  > 
  > proc.time()
     user  system elapsed 
     0.70    0.25    0.92