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
path: root/intern
diff options
context:
space:
mode:
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_bvh.h8
-rw-r--r--intern/cycles/kernel/kernel_subsurface.h4
-rw-r--r--intern/cycles/render/buffers.cpp2
-rw-r--r--intern/cycles/util/util_string.cpp2
-rw-r--r--intern/cycles/util/util_transform.h9
-rw-r--r--intern/iksolver/test/ik_glut_test/intern/main.cpp62
6 files changed, 42 insertions, 45 deletions
diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h
index 9d3d9c08a3b..4ddee6f656c 100644
--- a/intern/cycles/kernel/kernel_bvh.h
+++ b/intern/cycles/kernel/kernel_bvh.h
@@ -1043,10 +1043,10 @@ ccl_device_inline float3 curvetangent(float t, float3 p0, float3 p1, float3 p2,
float fc = 0.71f;
float data[4];
float t2 = t * t;
- data[0] = -3.0f * fc * t2 + 4.0f * fc * t - fc;
- data[1] = 3.0f * (2.0f - fc) * t2 + 2.0f * (fc - 3.0f) * t;
- data[2] = 3.0f * (fc - 2.0f) * t2 + 2.0f * (3.0f - 2.0f * fc) * t + fc;
- data[3] = 3.0f * fc * t2 - 2.0f * fc * t;
+ data[0] = -3.0f * fc * t2 + 4.0f * fc * t - fc;
+ data[1] = 3.0f * (2.0f - fc) * t2 + 2.0f * (fc - 3.0f) * t;
+ data[2] = 3.0f * (fc - 2.0f) * t2 + 2.0f * (3.0f - 2.0f * fc) * t + fc;
+ data[3] = 3.0f * fc * t2 - 2.0f * fc * t;
return data[0] * p0 + data[1] * p1 + data[2] * p2 + data[3] * p3;
}
diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h
index 2326ca18b55..fb927e81f22 100644
--- a/intern/cycles/kernel/kernel_subsurface.h
+++ b/intern/cycles/kernel/kernel_subsurface.h
@@ -250,8 +250,8 @@ ccl_device int subsurface_scatter_multi_step(KernelGlobals *kg, ShaderData *sd,
}
/* sample point on disk */
- float phi = M_2PI_F * disk_u;
- float disk_r = disk_v;
+ float phi = M_2PI_F * disk_u;
+ float disk_r = disk_v;
float disk_height;
bssrdf_sample(sc, disk_r, &disk_r, &disk_height);
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index 44a050ca530..da1b7484b77 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -99,7 +99,7 @@ RenderTile::RenderTile()
RenderBuffers::RenderBuffers(Device *device_)
{
- device = device_;
+ device = device_;
}
RenderBuffers::~RenderBuffers()
diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp
index 61a16b63351..f38d8d3282f 100644
--- a/intern/cycles/util/util_string.cpp
+++ b/intern/cycles/util/util_string.cpp
@@ -93,7 +93,7 @@ bool string_endswith(const string& s, const char *end)
if(len > s.size())
return 0;
else
- return strncmp(s.c_str() + s.size() - len, end, len) == 0;
+ return strncmp(s.c_str() + s.size() - len, end, len) == 0;
}
string string_strip(const string& s)
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h
index 1b6315ba484..4c7ce12d1de 100644
--- a/intern/cycles/util/util_transform.h
+++ b/intern/cycles/util/util_transform.h
@@ -264,7 +264,7 @@ ccl_device_inline bool transform_uniform_scale(const Transform& tfm, float& scal
/* the epsilon here is quite arbitrary, but this function is only used for
* surface area and bump, where we except it to not be so sensitive */
Transform ttfm = transform_transpose(tfm);
- float eps = 1e-6f;
+ float eps = 1e-6f;
float sx = len_squared(float4_to_float3(tfm.x));
float sy = len_squared(float4_to_float3(tfm.y));
@@ -275,12 +275,13 @@ ccl_device_inline bool transform_uniform_scale(const Transform& tfm, float& scal
if(fabsf(sx - sy) < eps && fabsf(sx - sz) < eps &&
fabsf(sx - stx) < eps && fabsf(sx - sty) < eps &&
- fabsf(sx - stz) < eps) {
+ fabsf(sx - stz) < eps)
+ {
scale = sx;
return true;
}
-
- return false;
+
+ return false;
}
ccl_device_inline bool transform_negative_scale(const Transform& tfm)
diff --git a/intern/iksolver/test/ik_glut_test/intern/main.cpp b/intern/iksolver/test/ik_glut_test/intern/main.cpp
index 86fea76ef70..bfb9d8fa1a0 100644
--- a/intern/iksolver/test/ik_glut_test/intern/main.cpp
+++ b/intern/iksolver/test/ik_glut_test/intern/main.cpp
@@ -40,62 +40,58 @@
#include "MyGlutMouseHandler.h"
#include "MyGlutKeyHandler.h"
#include "ChainDrawer.h"
-
-void
-init(MT_Vector3 min,MT_Vector3 max)
+
+void init(MT_Vector3 min,MT_Vector3 max)
{
-
GLfloat light_diffuse0[] = {1.0, 0.0, 0.0, 1.0}; /* Red diffuse light. */
GLfloat light_position0[] = {1.0, 1.0, 1.0, 0.0}; /* Infinite light location. */
GLfloat light_diffuse1[] = {1.0, 1.0, 1.0, 1.0}; /* Red diffuse light. */
GLfloat light_position1[] = {1.0, 0, 0, 0.0}; /* Infinite light location. */
- /* Enable a single OpenGL light. */
- glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse0);
- glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
+ /* Enable a single OpenGL light. */
+ glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse0);
+ glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
- glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse1);
- glLightfv(GL_LIGHT1, GL_POSITION, light_position1);
+ glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse1);
+ glLightfv(GL_LIGHT1, GL_POSITION, light_position1);
- glEnable(GL_LIGHT0);
- glEnable(GL_LIGHT1);
- glEnable(GL_LIGHTING);
+ glEnable(GL_LIGHT0);
+ glEnable(GL_LIGHT1);
+ glEnable(GL_LIGHTING);
- /* Use depth buffering for hidden surface elimination. */
- glEnable(GL_DEPTH_TEST);
+ /* Use depth buffering for hidden surface elimination. */
+ glEnable(GL_DEPTH_TEST);
- /* Setup the view of the cube. */
- glMatrixMode(GL_PROJECTION);
+ /* Setup the view of the cube. */
+ glMatrixMode(GL_PROJECTION);
// center of the box + 3* depth of box
- MT_Vector3 center = (min + max) * 0.5;
- MT_Vector3 diag = max - min;
+ MT_Vector3 center = (min + max) * 0.5;
+ MT_Vector3 diag = max - min;
float depth = diag.length();
float distance = 2;
- gluPerspective(
- /* field of view in degree */ 40.0,
- /* aspect ratio */ 1.0,
- /* Z near */ 1.0,
- /* Z far */ distance * depth * 2
- );
- glMatrixMode(GL_MODELVIEW);
+ gluPerspective(/* field of view in degree */ 40.0,
+ /* aspect ratio */ 1.0,
+ /* Z near */ 1.0,
+ /* Z far */ distance * depth * 2
+ );
+ glMatrixMode(GL_MODELVIEW);
- gluLookAt(
- center.x(), center.y(), center.z() + distance*depth, /* eye is at (0,0,5) */
- center.x(), center.y(), center.z(), /* center is at (0,0,0) */
- 0.0, 1.0, 0.); /* up is in positive Y direction */
+ gluLookAt(center.x(), center.y(), center.z() + distance*depth, /* eye is at (0,0,5) */
+ center.x(), center.y(), center.z(), /* center is at (0,0,0) */
+ 0.0, 1.0, 0.); /* up is in positive Y direction */
+
+ glPushMatrix();
- glPushMatrix();
-
}
-int
-main(int argc, char **argv)
+
+int main(int argc, char **argv)
{