diff options
-rw-r--r-- | src/core/model.cc | 2 | ||||
-rw-r--r-- | src/render/sphere.cc | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/core/model.cc b/src/core/model.cc index df6e563..686cbfd 100644 --- a/src/core/model.cc +++ b/src/core/model.cc @@ -628,5 +628,7 @@ void Model::list() << (*mit).second->model_light.size() << " lights\n"; } con_print << registry.size() << " registered models" << std::endl; + con_print << "vertex/evertex array usage " << (VertexArray::vertex_index * 100) / VERTEXARRAYSIZE << "%/" << + (VertexArray::evertex_index * 100) / VERTEXARRAYSIZE << "%\n"; } } 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(); |