summarylogtreecommitdiffstats
path: root/ospray.patch
blob: f825563d8f4676f836f0329c27fbbe25e81b08dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- src/OSPRayRenderer.C	2016-12-01 10:11:51.000000000 +0300
+++ src/OSPRayRenderer.C	2018-03-30 18:22:52.389958174 +0300
@@ -11,7 +11,7 @@
 *
 *      $RCSfile: OSPRayRenderer.C
 *      $Author: johns $      $Locker:  $               $State: Exp $
-*      $Revision: 1.60 $         $Date: 2016/11/28 06:00:48 $
+*      $Revision: 1.61 $         $Date: 2017/01/10 13:57:50 $
 *
 ***************************************************************************
 * DESCRIPTION:
@@ -659,7 +659,7 @@
   if (ao_samples != 0)
     lightscale = ao_direct;
 
-  for (int i = 0; i < directional_lights.num(); ++i) {
+  for (i = 0; i < directional_lights.num(); ++i) {
 #if 1
     OSPLight light = ospNewLight(ospRenderer, "distant");
 #else
@@ -2021,7 +2021,7 @@
   ca.cylinders = (float *) calloc(1, cylnum * bytes_per_cylinder);
   ca.colors = (float *) calloc(1, cylnum * 4 * sizeof(float));
 
-  unsigned int i,ind4,ind6,ind7;
+  int i,ind4,ind6,ind7;
   const int rOffset = 6; // radius offset
   if (wtrans == NULL) {
     for (i=0,ind4=0,ind6=0,ind7=0; i<cylnum; i++,ind4+=4,ind6+=6,ind7+=7) {
@@ -2469,10 +2469,7 @@
   int i, ind, ind9, ind12;
 
   const float ci2f = 1.0f / 255.0f;
-  const float cn2f = 1.0f / 127.5f;
   for (i=0,ind=0,ind9=0,ind12=0; i<numfacets; i++,ind+=3,ind9+=9,ind12+=12) {
-    float norm[9];
-
     // transform to eye coordinates
     wtrans.multpoint3d(v + ind9    , (float*) &mesh.v[ind9    ]);
     wtrans.multpoint3d(v + ind9 + 3, (float*) &mesh.v[ind9 + 3]);
@@ -2627,12 +2624,6 @@
   // create and fill the OSPRay trimesh memory buffer
   int i, ind, ind9, ind12;
 
-  const rgba c = { uniform_color[0], 
-                   uniform_color[1], 
-                   uniform_color[2], 
-                   1.0f /* mat_opacity*/ };
-
-
   for (i=0,ind=0,ind9=0,ind12=0; i<numfacets; i++,ind+=3,ind9+=9,ind12+=12) {
     // transform to eye coordinates
     wtrans.multpoint3d(v + ind9    , (float*) &mesh.v[ind9    ]);