Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-03-22 23:22:38 +0000
committerStijn Buys <ingar@osirion.org>2008-03-22 23:22:38 +0000
commit8485d43feca5597c4b412c6912aadcd9586e3cde (patch)
tree76727ff76ee64ca9976b590578c4e6a641c5208f /src/render
parent7fef8856b21215b0dd28dcc57f04c8a98ab5226f (diff)
display vertex array usage
fixed sphere orientation
Diffstat (limited to 'src/render')
-rw-r--r--src/render/sphere.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/render/sphere.cc b/src/render/sphere.cc
index 4a94acd..d44c9e6 100644
--- a/src/render/sphere.cc
+++ b/src/render/sphere.cc
@@ -97,33 +97,30 @@ void Sphere::draw()
} else {
gl::begin(gl::QuadStrip);
}
- v = Vector3f(r, radius*costable[j], 0);
+ v = Vector3f(r, 0, radius*costable[j]);
n = v;
n.normalize();
normal(n);
vertex(v);
- v = Vector3f(r1, radius*costable[j+1], 0);
+ v = Vector3f(r1, 0, radius*costable[j+1]);
n = v;
n.normalize();
normal(n);
vertex(v);
for (int i = segments-1; i >= 0; i--) {
- v = Vector3f(r*costable[i], radius*costable[j], r*sintable[i]);
+ v = Vector3f(r*costable[i], r*sintable[i], radius*costable[j]);
n = v;
n.normalize();
normal(n);
vertex(v);
- v = Vector3f(r1*costable[i], radius*costable[j+1], r1*sintable[i]);
+ v = Vector3f(r1*costable[i], r1*sintable[i], radius*costable[j+1]);
n = v;
n.normalize();
normal(n);
vertex(v);
-
- //vertex(r*costable[i-1], radius*costable[j], r*sintable[i-1]);
- //vertex(r1*costable[i-1], radius*costable[j+1], r1*sintable[i-1]);
}
end();