From 8485d43feca5597c4b412c6912aadcd9586e3cde Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 22 Mar 2008 23:22:38 +0000 Subject: display vertex array usage fixed sphere orientation --- src/render/sphere.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/render') 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(); -- cgit v1.2.3