Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-03 22:29:11 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-03 22:29:11 +0400
commit2996f08f845c4b67b0231d5832668da5ddb2d227 (patch)
tree419f3dbd78a19398883a405606f7a7de83084d90 /intern/cycles/subd
parent170f8c8c4109afb366bac0f385d9e2f59af6c8e2 (diff)
Cycles: first batch of windows build fixes, not quite there yet.
Diffstat (limited to 'intern/cycles/subd')
-rw-r--r--intern/cycles/subd/subd_build.cpp18
-rw-r--r--intern/cycles/subd/subd_split.cpp4
2 files changed, 11 insertions, 11 deletions
diff --git a/intern/cycles/subd/subd_build.cpp b/intern/cycles/subd/subd_build.cpp
index 4c2a6299014..640c30eba9d 100644
--- a/intern/cycles/subd/subd_build.cpp
+++ b/intern/cycles/subd/subd_build.cpp
@@ -228,7 +228,7 @@ void SubdAccBuilder::computeEdgeStencil(SubdFaceRing *ring, GregoryAccStencil *s
computeBoundaryTangentStencils(ring, vert, r0, r1);
int k = valence - 1;
- float omega = M_PI / k;
+ float omega = M_PI_F / k;
int eid1 = edge1Indices[primitiveOffset + v];
int eid2 = edge2Indices[primitiveOffset + v];
@@ -298,7 +298,7 @@ void SubdAccBuilder::computeEdgeStencil(SubdFaceRing *ring, GregoryAccStencil *s
}
}
else {
- float costerm = cosf(M_PI / valence);
+ float costerm = cosf(M_PI_F / valence);
float sqrtterm = sqrtf(4.0f + costerm*costerm);
/* float tangentScale = 1.0f; */
@@ -319,11 +319,11 @@ void SubdAccBuilder::computeEdgeStencil(SubdFaceRing *ring, GregoryAccStencil *s
SubdEdge *edge = eit.current();
assert(vert->co == edge->from()->co);
- float costerm1_a = cosf(M_PI * 2 * (j-i1) / valence);
- float costerm1_b = cosf(M_PI * (2 * (j-i1)-1) / valence); /* -1 instead of +1 b/c of edge->next->to() */
+ float costerm1_a = cosf(M_PI_F * 2 * (j-i1) / valence);
+ float costerm1_b = cosf(M_PI_F * (2 * (j-i1)-1) / valence); /* -1 instead of +1 b/c of edge->next->to() */
- float costerm2_a = cosf(M_PI * 2 * (j-i2) / valence);
- float costerm2_b = cosf(M_PI * (2 * (j-i2)-1) / valence); /* -1 instead of +1 b/c of edge->next->to() */
+ float costerm2_a = cosf(M_PI_F * 2 * (j-i2) / valence);
+ float costerm2_b = cosf(M_PI_F * (2 * (j-i2)-1) / valence); /* -1 instead of +1 b/c of edge->next->to() */
stencil->get(eid1, edge->to()) += alpha * costerm1_a;
@@ -413,10 +413,10 @@ void SubdAccBuilder::computeInteriorStencil(SubdFaceRing *ring, GregoryAccStenci
}
else {
SubdVert *e0 = edge->from();
- float costerm0 = cosf(2.0f * M_PI / pseudoValence(e0));
+ float costerm0 = cosf(2.0f * M_PI_F / pseudoValence(e0));
SubdVert *f0 = edge->to();
- float costerm1 = cosf(2.0f * M_PI / pseudoValence(f0));
+ float costerm1 = cosf(2.0f * M_PI_F / pseudoValence(f0));
/* p0 +------+ q0
* | |
@@ -566,7 +566,7 @@ void SubdAccBuilder::computeBoundaryTangentStencils(SubdFaceRing *ring, SubdVert
int valence = vert->valence();
int k = valence - 1;
- float omega = M_PI / k;
+ float omega = M_PI_F / k;
float s = sinf(omega);
float c = cosf(omega);
diff --git a/intern/cycles/subd/subd_split.cpp b/intern/cycles/subd/subd_split.cpp
index 712bd041e64..d61a42e4dcf 100644
--- a/intern/cycles/subd/subd_split.cpp
+++ b/intern/cycles/subd/subd_split.cpp
@@ -82,8 +82,8 @@ int DiagSplit::T(Patch *patch, float2 Pstart, float2 Pend)
Plast = P;
}
- int tmin = ceil(Lsum/dicing_rate);
- int tmax = ceil((test_steps-1)*Lmax/dicing_rate); // XXX paper says N instead of N-1, seems wrong?
+ int tmin = (int)ceil(Lsum/dicing_rate);
+ int tmax = (int)ceil((test_steps-1)*Lmax/dicing_rate); // XXX paper says N instead of N-1, seems wrong?
if(tmax - tmin > split_threshold)
return DSPLIT_NON_UNIFORM;