diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/sphere.cc | 11 |
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(); |