History

fix comments

ZappoMan committed 11 years ago

Commit 4e6ed4a1 parent 28569831 file · +4 −7Browse files

Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 1 file). Show all

Unified · Split

libraries/render-utils/src/GeometryCache.cpp+4−7
@@ -673,8 +673,7 @@ void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxC · 672 unmodified lines
673673 Vec2Pair key(minCorner, maxCorner);
674674 VerticesIndices& vbo = registeredQuad ? _registeredQuadVBOs[quadID] : _quad2DVBOs[key];
675675
676− // if this is a registered quad, and we have buffers, then clear them and rebuild
677− // TODO: would be nice to only rebuild if the geometry changed from last time.
676+ // if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
678677 if (registeredQuad && vbo.first != 0) {
679678 Vec2Pair& lastKey = _lastRegisteredQuad2D[quadID];
680679 if (lastKey != key) {
@@ -757,7 +756,7 @@ void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxC · 76 unmodified lines
757756 Vec2PairPair key(Vec2Pair(minCorner, maxCorner), Vec2Pair(texCoordMinCorner, texCoordMaxCorner));
758757 VerticesIndices& vbo = registeredQuad ? _registeredQuadVBOs[quadID] : _quad2DTextureVBOs[key];
759758
760− // if this is a registered quad, and we have buffers, then clear them and rebuild
759+ // if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
761760 if (registeredQuad && vbo.first != 0) {
762761 Vec2PairPair& lastKey = _lastRegisteredQuad2DTexture[quadID];
763762 if (lastKey != key) {
@@ -855,8 +854,7 @@ void GeometryCache::renderQuad(const glm::vec3& minCorner, const glm::vec3& maxC · 91 unmodified lines
855854 Vec3Pair key(minCorner, maxCorner);
856855 VerticesIndices& vbo = registeredQuad ? _registeredQuadVBOs[quadID] : _quad3DVBOs[key];
857856
858− // if this is a registered quad, and we have buffers, then clear them and rebuild
859− // TODO: would be nice to only rebuild if the geometry changed from last time.
857+ // if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
860858 if (registeredQuad && vbo.first != 0) {
861859 Vec3Pair& lastKey = _lastRegisteredQuad3D[quadID];
862860 if (lastKey != key) {
@@ -959,8 +957,7 @@ void GeometryCache::renderQuad(const glm::vec3& topLeft, const glm::vec3& bottom · 96 unmodified lines
959957 Vec3PairVec2Pair key(Vec3Pair(topLeft, bottomRight), Vec2Pair(texCoordTopLeft, texCoordBottomRight));
960958 VerticesIndices& vbo = registeredQuad ? _registeredQuadVBOs[quadID] : _quad3DTextureVBOs[key];
961959
962− // if this is a registered quad, and we have buffers, then clear them and rebuild
963− // TODO: would be nice to only rebuild if the geometry changed from last time.
960+ // if this is a registered quad, and we have buffers, then check to see if the geometry changed and rebuild if needed
964961 if (registeredQuad && vbo.first != 0) {
965962 Vec3PairVec2Pair& lastKey = _lastRegisteredQuad3DTexture[quadID];
966963 if (lastKey != key) {