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,11 +139,9 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
Tables tables;
QVector<unsigned int> ib = input.index_buffer;
if(debugOutput)
qCDebug(log_subdiv) << "Index Buffer: " << ib;
QVector<Vertex> vb = input.vertex_buffer;
if(debugOutput)
qCDebug(log_subdiv) << "Vertex Buffer: " << vb;
QVector<Triangle> triangles;
......@@ -263,13 +256,11 @@ 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];
}
}
//compute vertex table
//Format: First entry: original vertex. Other entries: adjacent vertices.
......@@ -336,12 +327,10 @@ 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];
}
}
tables.index_regular = getPatchIndexBuffer(ib);
qInfo() << "Precompute Tables Done";
return tables;
......@@ -592,18 +581,14 @@ 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:";
for (int i = 0; i < input.vertex_buffer.size(); i++) {
if(debugOutput)
qCDebug(log_subdiv) << ptr[i].pos;
result.vertex_buffer.push_back(ptr[i]);
}
if(debugOutput)
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;
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