diff options
author | Ian Romanick <idr@freedesktop.org> | 2010-11-30 12:40:52 -0800 |
---|---|---|
committer | Ian Romanick <idr@freedesktop.org> | 2010-11-30 12:40:52 -0800 |
commit | 273d22b87594e698dbf892af900fb0b7981a7706 (patch) | |
tree | 369e33fdf5b3d5afa33a22deeec8d214e360f33b | |
parent | 5159190725da6d6aa390a881d3d868d643bc36a7 (diff) |
GLUshape: Correct the element count calculation for meshes
The parenthesis were in the wrong place, so the element count was much
too large. As a result, users of the mesh interfaces tried to draw
elements that were not initialized by the producer. This caused
various failure modes on different drivers.
-rw-r--r-- | src/mesh.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesh.cpp b/src/mesh.cpp index 6b0d667..d95a1ca 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -34,7 +34,7 @@ GLUmeshProducer::vertex_count(void) const unsigned GLUmeshProducer::element_count(void) const { - return this->rows * (2 * (this->columns + 1)); + return this->rows * ((2 * this->columns) + 1); } unsigned |