Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 1 file). Show all
Unified · Split
| @@ -607,7 +607,7 @@ void GeometryCache::renderGrid(int x, int y, int width, int height, int rows, in · 606 unmodified lines | ||
| 607 | 607 | } |
| 608 | 608 | |
| 609 | 609 | void GeometryCache::updateVertices(int id, const QVector<glm::vec2>& points, const glm::vec4& color) { |
| 610 | − qDebug() << "GeometryCache::updateVertices(id=" << id <<")..."; | |
| 610 | + qDebug() << "GeometryCache::updateVertices(vec2.... id=" << id <<")..."; | |
| 611 | 611 | BatchItemDetails& details = _registeredVertices[id]; |
| 612 | 612 | |
| 613 | 613 | if (details.isCreated) { |
| @@ -632,7 +632,7 @@ void GeometryCache::updateVertices(int id, const QVector<glm::vec2>& points, con · 18 unmodified lines | ||
| 632 | 632 | details.streamFormat = streamFormat; |
| 633 | 633 | details.stream = stream; |
| 634 | 634 | |
| 635 | − details.streamFormat->setAttribute(gpu::Stream::POSITION, 0, gpu::Element(gpu::VEC3, gpu::FLOAT, gpu::POS_XYZ), 0); | |
| 635 | + details.streamFormat->setAttribute(gpu::Stream::POSITION, 0, gpu::Element(gpu::VEC2, gpu::FLOAT, gpu::POS_XYZ), 0); | |
| 636 | 636 | details.streamFormat->setAttribute(gpu::Stream::COLOR, 1, gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA)); |
| 637 | 637 | |
| 638 | 638 | details.stream->addBuffer(details.verticesBuffer, 0, details.streamFormat->getChannels().at(0)._stride); |
| @@ -652,7 +652,11 @@ void GeometryCache::updateVertices(int id, const QVector<glm::vec2>& points, con · 13 unmodified lines | ||
| 652 | 652 | int* colorData = new int[details.vertices]; |
| 653 | 653 | int* colorDataAt = colorData; |
| 654 | 654 | |
| 655 | + //qDebug() << " details.vertices:" << details.vertices; | |
| 656 | + //qDebug() << " points.size:" << points.size(); | |
| 657 | + | |
| 655 | 658 | foreach (const glm::vec2& point, points) { |
| 659 | + //qDebug() << " point:" << point; | |
| 656 | 660 | *(vertex++) = point.x; |
| 657 | 661 | *(vertex++) = point.y; |
| 658 | 662 | |
| @@ -670,7 +674,7 @@ void GeometryCache::updateVertices(int id, const QVector<glm::vec2>& points, con · 11 unmodified lines | ||
| 670 | 674 | } |
| 671 | 675 | |
| 672 | 676 | void GeometryCache::updateVertices(int id, const QVector<glm::vec3>& points, const glm::vec4& color) { |
| 673 | − qDebug() << "GeometryCache::updateVertices(id=" << id <<")..."; | |
| 677 | + //qDebug() << "GeometryCache::updateVertices(id=" << id <<")..."; | |
| 674 | 678 | BatchItemDetails& details = _registeredVertices[id]; |
| 675 | 679 | |
| 676 | 680 | if (details.isCreated) { |
| @@ -965,7 +969,7 @@ void GeometryCache::renderWireCube(float size, const glm::vec4& color) { · 288 unmodified lines | ||
| 965 | 969 | } |
| 966 | 970 | |
| 967 | 971 | void GeometryCache::renderBevelCornersRect(int x, int y, int width, int height, int bevelDistance, const glm::vec4& color, int id) { |
| 968 | − qDebug() << "GeometryCache::renderBevelCornersRect(id=" << id <<")..."; | |
| 972 | + //qDebug() << "GeometryCache::renderBevelCornersRect(id=" << id <<")..."; | |
| 969 | 973 | bool registered = (id != UNKNOWN_ID); |
| 970 | 974 | Vec3Pair key(glm::vec3(x, y, 0.0f), glm::vec3(width, height, bevelDistance)); |
| 971 | 975 | BatchItemDetails& details = registered ? _registeredBevelRects[id] : _bevelRects[key]; |
| @@ -1073,7 +1077,7 @@ void GeometryCache::renderBevelCornersRect(int x, int y, int width, int height, · 101 unmodified lines | ||
| 1073 | 1077 | } |
| 1074 | 1078 | |
| 1075 | 1079 | void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxCorner, const glm::vec4& color, int id) { |
| 1076 | − qDebug() << "GeometryCache::renderQuad(vec2,id=" << id <<")..."; | |
| 1080 | + //qDebug() << "GeometryCache::renderQuad(vec2,id=" << id <<")..."; | |
| 1077 | 1081 | bool registered = (id != UNKNOWN_ID); |
| 1078 | 1082 | Vec2Pair key(minCorner, maxCorner); |
| 1079 | 1083 | BatchItemDetails& details = registered ? _registeredQuad2D[id] : _quad2D[key]; |
| @@ -1157,7 +1161,7 @@ void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxC · 77 unmodified lines | ||
| 1157 | 1161 | const glm::vec2& texCoordMinCorner, const glm::vec2& texCoordMaxCorner, |
| 1158 | 1162 | const glm::vec4& color, int id) { |
| 1159 | 1163 | |
| 1160 | − qDebug() << "GeometryCache::renderQuad(vec2/texture,id=" << id <<")..."; | |
| 1164 | + //qDebug() << "GeometryCache::renderQuad(vec2/texture,id=" << id <<")..."; | |
| 1161 | 1165 | bool registered = (id != UNKNOWN_ID); |
| 1162 | 1166 | Vec2PairPair key(Vec2Pair(minCorner, maxCorner), Vec2Pair(texCoordMinCorner, texCoordMaxCorner)); |
| 1163 | 1167 | BatchItemDetails& details = registered ? _registeredQuad2DTextures[id] : _quad2DTextures[key]; |
| @@ -1248,7 +1252,7 @@ void GeometryCache::renderQuad(const glm::vec2& minCorner, const glm::vec2& maxC · 84 unmodified lines | ||
| 1248 | 1252 | } |
| 1249 | 1253 | |
| 1250 | 1254 | void GeometryCache::renderQuad(const glm::vec3& minCorner, const glm::vec3& maxCorner, const glm::vec4& color, int id) { |
| 1251 | − qDebug() << "GeometryCache::renderQuad(vec3,id=" << id <<")..."; | |
| 1255 | + //qDebug() << "GeometryCache::renderQuad(vec3,id=" << id <<")..."; | |
| 1252 | 1256 | bool registered = (id != UNKNOWN_ID); |
| 1253 | 1257 | Vec3Pair key(minCorner, maxCorner); |
| 1254 | 1258 | BatchItemDetails& details = registered ? _registeredQuad3D[id] : _quad3D[key]; |
| @@ -1569,7 +1573,7 @@ void GeometryCache::BatchItemDetails::clear() { · 314 unmodified lines | ||
| 1569 | 1573 | void GeometryCache::renderLine(const glm::vec3& p1, const glm::vec3& p2, |
| 1570 | 1574 | const glm::vec4& color1, const glm::vec4& color2, int id) { |
| 1571 | 1575 | |
| 1572 | − qDebug() << "GeometryCache::renderLine(vec3)..."; | |
| 1576 | + //qDebug() << "GeometryCache::renderLine(vec3)..."; | |
| 1573 | 1577 | bool registered = (id != UNKNOWN_ID); |
| 1574 | 1578 | Vec3Pair key(p1, p2); |
| 1575 | 1579 | |
| @@ -1662,7 +1666,7 @@ void GeometryCache::renderLine(const glm::vec3& p1, const glm::vec3& p2, · 86 unmodified lines | ||
| 1662 | 1666 | void GeometryCache::renderLine(const glm::vec2& p1, const glm::vec2& p2, |
| 1663 | 1667 | const glm::vec4& color1, const glm::vec4& color2, int id) { |
| 1664 | 1668 | |
| 1665 | − qDebug() << "GeometryCache::renderLine(vec2)..."; | |
| 1669 | + //qDebug() << "GeometryCache::renderLine(vec2)..."; | |
| 1666 | 1670 | bool registered = (id != UNKNOWN_ID); |
| 1667 | 1671 | Vec2Pair key(p1, p2); |
| 1668 | 1672 | |