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:
authorCampbell Barton <ideasman42@gmail.com>2014-02-03 06:55:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-03 06:56:34 +0400
commit1dc1d92dabe08fd78791ab02295c65adefdb61c8 (patch)
treecea2c3857deb2ca923f041a7e3acce2dc30a1777 /intern/iksolver
parent236e46835908f05a54e09cf2774386e5a8ef8be1 (diff)
Code cleanup: white space and cmake was broken on all platforms
Diffstat (limited to 'intern/iksolver')
-rw-r--r--intern/iksolver/test/ik_glut_test/intern/main.cpp62
1 files changed, 29 insertions, 33 deletions
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)
{