Skip to content

Commit 9fd2521

Browse files
author
Haydelj
committed
removed print statements
1 parent b02ed9b commit 9fd2521

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/Modules/Visualization/ShowField.cc

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,6 @@ void GeometryBuilder::renderFaces(
431431

432432

433433

434-
static size_t vboInsertionSize = 0;
435-
static size_t iboInsertionSize = 0;
436-
static size_t vboLastPrintSize = 0;
437-
static size_t iboLastPrintSize = 0;
438434
void GeometryBuilder::renderFacesLinear(
439435
FieldHandle field,
440436
boost::optional<boost::shared_ptr<ColorMap>> colorMap,
@@ -444,11 +440,6 @@ void GeometryBuilder::renderFacesLinear(
444440
unsigned int approxDiv,
445441
const std::string& id)
446442
{
447-
vboInsertionSize = 0;
448-
iboInsertionSize = 0;
449-
vboLastPrintSize = 0;
450-
iboLastPrintSize = 0;
451-
452443
VField* fld = field->vfield();
453444
VMesh* mesh = field->vmesh();
454445

@@ -498,18 +489,10 @@ void GeometryBuilder::renderFacesLinear(
498489
mesh->get_nodes(nodes, *fiter);
499490
mesh->get_point(idpt, nodes[0]);
500491

501-
std::cout << "Number of Attributes: " << numAttributes << "\n";
502492
// Three 32 bit ints for each triangle to index into the VBO (triangles = verticies - 2)
503493
size_t iboSize = static_cast<size_t>(mesh->num_faces() * sizeof(uint32_t) * (nodes.size() - 2) * 3);
504494
size_t vboSize = static_cast<size_t>(mesh->num_faces() * sizeof(float) * nodes.size() * numAttributes);
505495

506-
//size_t vboSize = static_cast<size_t>(mesh->num_faces() * sizeof(uint32_t) * 3);
507-
//size_t iboSize = static_cast<size_t>(mesh->num_faces() * sizeof(float) * 7);
508-
509-
std::cout << "Faces: " << mesh->num_faces() << "\n";
510-
std::cout << "IBO buffer size: " << iboSize/1024/1024 << "MiB\n";
511-
std::cout << "VBO buffer size: " << vboSize/1024/1024 << "MiB\n";
512-
513496
// Construct VBO and IBO that will be used to render the faces. Once again, IBOs are not strictly
514497
// needed. But, we may be able to optimize this code somewhat.
515498
// todo Switch to unique_ptrs and move semantics.
@@ -878,11 +861,6 @@ void GeometryBuilder::renderFacesLinear(
878861
SpireIBO geomIBO(iboName, SpireIBO::PRIMITIVE::TRIANGLES, sizeof(uint32_t), iboBufferSPtr);
879862
geom->ibos().push_back(geomIBO);
880863

881-
std::cout << "Actual IBO size: " << iboBufferSPtr->getBufferSize()/1024/1024 << "MiB\n";
882-
std::cout << "Allocated IBO size: " << iboBufferSPtr->getAllocatedSize()/1024/1024 << "MiB\n";
883-
std::cout << "Actual VBO size: " << vboBufferSPtr->getBufferSize()/1024/1024 << "MiB\n";
884-
std::cout << "Allocated VBO size: " << vboBufferSPtr->getAllocatedSize()/1024/1024 << "MiB\n";
885-
886864
SpireText text;
887865
SpireSubPass pass(passName, vboName, iboName, shader,
888866
colorScheme, state, RenderType::RENDER_VBO_IBO, geomVBO, geomIBO, text);
@@ -917,23 +895,20 @@ void GeometryBuilder::addFaceGeom(
917895

918896
auto writeVBOPoint = [&vboBuffer](const Point& point)
919897
{
920-
vboInsertionSize += 3*sizeof(float);
921898
vboBuffer->write(static_cast<float>(point.x()));
922899
vboBuffer->write(static_cast<float>(point.y()));
923900
vboBuffer->write(static_cast<float>(point.z()));
924901
};
925902

926903
auto writeVBONormal = [&vboBuffer](const Vector& normal)
927904
{
928-
vboInsertionSize += 3*sizeof(float);
929905
vboBuffer->write(static_cast<float>(normal.x()));
930906
vboBuffer->write(static_cast<float>(normal.y()));
931907
vboBuffer->write(static_cast<float>(normal.z()));
932908
};
933909

934910
auto writeVBOColorValue = [&vboBuffer](ColorRGB value)
935911
{
936-
vboInsertionSize += 4*sizeof(float);
937912
vboBuffer->write(static_cast<float>(value.r()));
938913
vboBuffer->write(static_cast<float>(value.g()));
939914
vboBuffer->write(static_cast<float>(value.b()));
@@ -942,14 +917,12 @@ void GeometryBuilder::addFaceGeom(
942917

943918
auto writeIBOIndex = [&iboBuffer](uint32_t index)
944919
{
945-
iboInsertionSize += sizeof(uint32_t);
946920
iboBuffer->write(index);
947921
};
948922

949923

950924
bool doubleSided = state.get(RenderState::IS_DOUBLE_SIDED);
951925

952-
953926
if (colorScheme == ColorScheme::COLOR_UNIFORM)
954927
{
955928
if (points.size() == 4)
@@ -1225,11 +1198,6 @@ void GeometryBuilder::addFaceGeom(
12251198
iboIndex += points.size();
12261199
}
12271200
}
1228-
1229-
if((vboInsertionSize - vboLastPrintSize) > (1024 * 1024 * 16))
1230-
std::cout << "VBO size: " << (vboLastPrintSize = vboInsertionSize)/1024/1024 << "MiB\n";
1231-
if((iboInsertionSize - iboLastPrintSize) > (1024 * 1024 * 16))
1232-
std::cout << "IBO size: " << (iboLastPrintSize = iboInsertionSize)/1024/1024 << "MiB\n";
12331201
}
12341202

12351203

0 commit comments

Comments
 (0)