Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 5 files). Show all
Unified · Split
| @@ -523,11 +523,11 @@ void GeometryCache::renderGrid(int x, int y, int width, int height, int rows, in · 522 unmodified lines | ||
| 523 | 523 | Vec3Pair& lastKey = _lastRegisteredGrid[id]; |
| 524 | 524 | if (lastKey != key) { |
| 525 | 525 | buffer.destroy(); |
| 526 | − #if 1// def WANT_DEBUG | |
| 526 | + #ifdef WANT_DEBUG | |
| 527 | 527 | qDebug() << "renderGrid()... RELEASING REGISTERED"; |
| 528 | 528 | #endif // def WANT_DEBUG |
| 529 | 529 | } |
| 530 | − #if 1// def WANT_DEBUG | |
| 530 | + #ifdef WANT_DEBUG | |
| 531 | 531 | else { |
| 532 | 532 | qDebug() << "renderGrid()... REUSING PREVIOUSLY REGISTERED"; |
| 533 | 533 | } |
| @@ -575,7 +575,7 @@ void GeometryCache::renderGrid(int x, int y, int width, int height, int rows, in · 41 unmodified lines | ||
| 575 | 575 | buffer.allocate(vertexData, vertices * 2 * sizeof(GLfloat)); |
| 576 | 576 | delete[] vertexData; |
| 577 | 577 | |
| 578 | − #if 1 //def WANT_DEBUG | |
| 578 | + #ifdef WANT_DEBUG | |
| 579 | 579 | if (id == UNKNOWN_ID) { |
| 580 | 580 | qDebug() << "new grid buffer made -- _alternateGridBuffers.size():" << _alternateGridBuffers.size(); |
| 581 | 581 | } else { |
| @@ -602,7 +602,7 @@ void GeometryCache::updateVertices(int id, const QVector<glm::vec2>& points) { · 20 unmodified lines | ||
| 602 | 602 | |
| 603 | 603 | if (details.buffer.isCreated()) { |
| 604 | 604 | details.buffer.destroy(); |
| 605 | − #if 1// def WANT_DEBUG | |
| 605 | + #ifdef WANT_DEBUG | |
| 606 | 606 | qDebug() << "updateVertices()... RELEASING REGISTERED"; |
| 607 | 607 | #endif // def WANT_DEBUG |
| 608 | 608 | } |
| @@ -625,7 +625,7 @@ void GeometryCache::updateVertices(int id, const QVector<glm::vec2>& points) { · 16 unmodified lines | ||
| 625 | 625 | details.buffer.allocate(vertexData, details.vertices * FLOATS_PER_VERTEX * sizeof(GLfloat)); |
| 626 | 626 | delete[] vertexData; |
| 627 | 627 | |
| 628 | − #if 1 //def WANT_DEBUG | |
| 628 | + #ifdef WANT_DEBUG | |
| 629 | 629 | qDebug() << "new registered vertices buffer made -- _registeredVertices.size():" << _registeredVertices.size(); |
| 630 | 630 | #endif |
| 631 | 631 | } |
| @@ -635,7 +635,7 @@ void GeometryCache::updateVertices(int id, const QVector<glm::vec3>& points) { · 3 unmodified lines | ||
| 635 | 635 | |
| 636 | 636 | if (details.buffer.isCreated()) { |
| 637 | 637 | details.buffer.destroy(); |
| 638 | − #if 1// def WANT_DEBUG | |
| 638 | + #ifdef WANT_DEBUG | |
| 639 | 639 | qDebug() << "updateVertices()... RELEASING REGISTERED"; |
| 640 | 640 | #endif // def WANT_DEBUG |
| 641 | 641 | } |
| @@ -659,7 +659,7 @@ void GeometryCache::updateVertices(int id, const QVector<glm::vec3>& points) { · 17 unmodified lines | ||
| 659 | 659 | details.buffer.allocate(vertexData, details.vertices * FLOATS_PER_VERTEX * sizeof(GLfloat)); |
| 660 | 660 | delete[] vertexData; |
| 661 | 661 | |
| 662 | − #if 1 //def WANT_DEBUG | |
| 662 | + #ifdef WANT_DEBUG | |
| 663 | 663 | qDebug() << "new registered linestrip buffer made -- _registeredVertices.size():" << _registeredVertices.size(); |
| 664 | 664 | #endif |
| 665 | 665 | } |
| @@ -1326,7 +1326,7 @@ void GeometryCache::renderDashedLine(const glm::vec3& start, const glm::vec3& en · 660 unmodified lines | ||
| 1326 | 1326 | if (_lastRegisteredDashedLines[id] != key) { |
| 1327 | 1327 | details.buffer.destroy(); |
| 1328 | 1328 | _lastRegisteredDashedLines[id] = key; |
| 1329 | − #if 1// def WANT_DEBUG | |
| 1329 | + #ifdef WANT_DEBUG | |
| 1330 | 1330 | qDebug() << "renderDashedLine()... RELEASING REGISTERED"; |
| 1331 | 1331 | #endif // def WANT_DEBUG |
| 1332 | 1332 | } |
| @@ -1379,7 +1379,7 @@ void GeometryCache::renderDashedLine(const glm::vec3& start, const glm::vec3& en · 46 unmodified lines | ||
| 1379 | 1379 | details.buffer.allocate(vertexData, details.vertices * FLOATS_PER_VERTEX * sizeof(GLfloat)); |
| 1380 | 1380 | delete[] vertexData; |
| 1381 | 1381 | |
| 1382 | − #if 1 //def WANT_DEBUG | |
| 1382 | + #ifdef WANT_DEBUG | |
| 1383 | 1383 | if (registered) { |
| 1384 | 1384 | qDebug() << "new registered dashed line buffer made -- _registeredVertices:" << _registeredDashedLines.size(); |
| 1385 | 1385 | } else { |
| @@ -1494,11 +1494,11 @@ void GeometryCache::renderLine(const glm::vec2& p1, const glm::vec2& p2, int id) · 108 unmodified lines | ||
| 1494 | 1494 | glDeleteBuffers(1, &vbo.first); |
| 1495 | 1495 | glDeleteBuffers(1, &vbo.second); |
| 1496 | 1496 | vbo.first = vbo.second = 0; |
| 1497 | − #if 1 // def WANT_DEBUG | |
| 1497 | + #ifdef WANT_DEBUG | |
| 1498 | 1498 | qDebug() << "renderLine() 2D... RELEASING REGISTERED line"; |
| 1499 | 1499 | #endif // def WANT_DEBUG |
| 1500 | 1500 | } |
| 1501 | − #if 1 // def WANT_DEBUG | |
| 1501 | + #ifdef WANT_DEBUG | |
| 1502 | 1502 | else { |
| 1503 | 1503 | qDebug() << "renderLine() 2D... REUSING PREVIOUSLY REGISTERED line"; |
| 1504 | 1504 | } |
| @@ -1544,7 +1544,7 @@ void GeometryCache::renderLine(const glm::vec2& p1, const glm::vec2& p2, int id) · 39 unmodified lines | ||
| 1544 | 1544 | glBufferData(GL_ELEMENT_ARRAY_BUFFER, indices * NUM_BYTES_PER_INDEX, indexData, GL_STATIC_DRAW); |
| 1545 | 1545 | delete[] indexData; |
| 1546 | 1546 | |
| 1547 | − #if 1 // def WANT_DEBUG | |
| 1547 | + #ifdef WANT_DEBUG | |
| 1548 | 1548 | if (id == UNKNOWN_ID) { |
| 1549 | 1549 | qDebug() << "new renderLine() 2D VBO made -- _line2DVBOs.size():" << _line2DVBOs.size(); |
| 1550 | 1550 | } else { |