Commit 3368c442 by Philipp Adolf

Remove debugOutput variable

parent d737b96a
......@@ -158,12 +158,6 @@ void MainWidget::subdivide(int level){
}
void MainWidget::setdebugOutput(bool output){
subdivision->setDebugOutbut(output);
}
void MainWidget::setRotation(bool started){
qDebug()<<"rotation"<<started;
this->rotation = started;
......
......@@ -35,7 +35,6 @@ public slots:
void setRotation(bool started);
void setWireframe(bool active);
void subdivide(int level);
void setdebugOutput(bool output);
protected:
void initializeGL();
......
......@@ -7,7 +7,6 @@
Subdivision::Subdivision(QOpenGLFunctions_4_3_Core *f)
{
this->f =f;
debugOutput = false;
}
Subdivision::~Subdivision()
......@@ -15,10 +14,6 @@ Subdivision::~Subdivision()
delete edgeShader;
}
void Subdivision::setDebugOutbut(bool debug){
this->debugOutput = debug;
}
void Subdivision::init() {
QString source = QLatin1String(":/subdivision-edge.compute");
edgeShader = initComputeShaderProgram(source);
......@@ -144,12 +139,10 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
Tables tables;
QVector<unsigned int> ib = input.index_buffer;
if(debugOutput)
qCDebug(log_subdiv) << "Index Buffer: " << ib;
qCDebug(log_subdiv) << "Index Buffer: " << ib;
QVector<Vertex> vb = input.vertex_buffer;
if(debugOutput)
qCDebug(log_subdiv) << "Vertex Buffer: " << vb;
qCDebug(log_subdiv) << "Vertex Buffer: " << vb;
QVector<Triangle> triangles;
for (int i = 0; i < ib.length(); i+=3) {
......@@ -263,12 +256,10 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
}
qCDebug(log_subdiv) << "Done with edge table. " << tables.edge_indices.length();
if (debugOutput){
qCDebug(log_subdiv) << "Eedges found. Table: " << tables.edge_indices;
qCDebug(log_subdiv) << "Table (long version):";
for (int i = 0; i < tables.edge_indices.length(); i++){
qCDebug(log_subdiv) << "blub:" << tables.edge_indices[i];
}
qCDebug(log_subdiv) << "Eedges found. Table: " << tables.edge_indices;
qCDebug(log_subdiv) << "Table (long version):";
for (int i = 0; i < tables.edge_indices.length(); i++){
qCDebug(log_subdiv) << "blub:" << tables.edge_indices[i];
}
//compute vertex table
......@@ -336,11 +327,9 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
tables.vertex_offsets.push_back(offset);
qCDebug(log_subdiv) << "Done with vertex index table. ";
if(debugOutput){
qCDebug(log_subdiv) << "Duplicates: ";
for (int i = 0; i < duplicates.length(); i++){
qCDebug(log_subdiv) << duplicates[i];
}
qCDebug(log_subdiv) << "Duplicates: ";
for (int i = 0; i < duplicates.length(); i++){
qCDebug(log_subdiv) << duplicates[i];
}
tables.index_regular = getPatchIndexBuffer(ib);
qInfo() << "Precompute Tables Done";
......@@ -592,19 +581,15 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
Vertex *ptr;
ptr = (Vertex *) f->glMapBuffer(GL_SHADER_STORAGE_BUFFER, GL_WRITE_ONLY);
if(debugOutput)
qCDebug(log_subdiv) << "New vertices:";
qCDebug(log_subdiv) << "New vertices:";
for (int i = 0; i < input.vertex_buffer.size(); i++) {
if(debugOutput)
qCDebug(log_subdiv) << ptr[i].pos;
qCDebug(log_subdiv) << ptr[i].pos;
result.vertex_buffer.push_back(ptr[i]);
}
if(debugOutput)
qCDebug(log_subdiv) << "New edge points:";
qCDebug(log_subdiv) << "New edge points:";
for (int i = 0; i < tables.edge_indices.size() / 4; i++) {
if(debugOutput)
qCDebug(log_subdiv) << ptr[edgeOffset + i].pos;
qCDebug(log_subdiv) << ptr[edgeOffset + i].pos;
result.vertex_buffer.push_back(ptr[edgeOffset + i]);
}
......
......@@ -16,11 +16,8 @@ public:
void init();
void splitRegular(Mesh *mesh);
void subdivide(Mesh *mesh, int level);
void setDebugOutbut(bool debug);
private:
bool debugOutput;
struct Input
{
GLuint vb_handle;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment