Commit fec25eca by Kai Westerkamp

removed qInfo() and windows compile errors

parent 2b4f6b1c
......@@ -33,7 +33,7 @@ HEADERS += mainwindow.h \
subdivision.h \
vertex.h \
triangle.h \
logcategories.cpp
logcategories.h
FORMS +=
......
......@@ -188,7 +188,7 @@ QOpenGLShaderProgram* MainWidget::initShaderProgram(QString vertSource, QString
qCritical()<< "Linking shader failed:"<<shader->log();
exit(5);
}
qInfo()<<"Linking Shader done";
qDebug()<<"Linking Shader done";
return shader;
......
......@@ -34,11 +34,11 @@ MainWindow::MainWindow(QWidget *parent) :
connect(CamHome, SIGNAL(triggered()), cam, SLOT(home()));
toolBar->addAction(CamHome);
debugOutput = new QAction("DebugOutput",this);
debugOutput->setCheckable(true);
debugOutput->setChecked(false);
connect(debugOutput, SIGNAL(triggered(bool)), m_centralWidget, SLOT(setdebugOutput(bool)));
toolBar->addAction(debugOutput);
// debugOutput = new QAction("DebugOutput",this);
// debugOutput->setCheckable(true);
// debugOutput->setChecked(false);
// connect(debugOutput, SIGNAL(triggered(bool)), m_centralWidget, SLOT(setdebugOutput(bool)));
// toolBar->addAction(debugOutput);
subdivSlider = new QSlider(Qt::Horizontal);
subdivSlider->setMinimum(0);
......
......@@ -21,11 +21,13 @@ void Mesh::SubdivEntry::updateIndices() {
f->glDeleteBuffers(1, &IB_irregular_handle);
f->glGenBuffers(1, &IB_irregular_handle);
f->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IB_irregular_handle);
if(indices_irregular.size() != 0)
f->glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int) * indices_irregular.size(), &indices_irregular[0], GL_STATIC_DRAW);
f->glDeleteBuffers(1, &IB_regular_handle);
f->glGenBuffers(1, &IB_regular_handle);
f->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IB_regular_handle);
if(indices_regular.size() != 0)
f->glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int) * indices_regular.size(), &indices_regular[0], GL_STATIC_DRAW);
}
......@@ -55,10 +57,12 @@ void Mesh::SubdivEntry::init(QOpenGLFunctions_4_3_Core *f, GLuint VB_handle, QVe
f->glGenBuffers(1, &IB_irregular_handle);
f->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IB_irregular_handle);
if(indices_irregular.size() != 0)
f->glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int) * indices_irregular.size(), &indices_irregular[0], GL_STATIC_DRAW);
f->glGenBuffers(1, &IB_regular_handle);
f->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IB_regular_handle);
if(patches.size() != 0)
f->glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int) * patches.size(), &patches[0], GL_STATIC_DRAW);
}
......
......@@ -70,7 +70,7 @@ void main()
addWireframe();
// color = materialInfo.Diffuse;
// color = vec4(materialInfo.Diffuse,0);
// color = normalize(abs(vec3(gCamPosition.x,gCamPosition.y,0.0)));
}
......@@ -22,7 +22,7 @@ void Subdivision::init() {
}
QOpenGLShaderProgram *Subdivision::initComputeShaderProgram(QString &source){
qCInfo(log_subdiv) << "Compiling compute shader ...";
qCDebug(log_subdiv) << "Compiling compute shader ...";
QOpenGLShader *computeShader = new QOpenGLShader(QOpenGLShader::Compute);
if(!computeShader->compileSourceFile(source)){
qCCritical(log_subdiv) << "Compute Shader" << source << "failed" << computeShader->log();
......@@ -57,7 +57,7 @@ void Subdivision::subdivide(Mesh *mesh, int level) {
Input input;
int currentMax = current_mesh->buffers.size()-1;
qCInfo(log_subdiv) << "Subdiv Level" << level << "Requested. Current Max:" << currentMax;
qCDebug(log_subdiv) << "Subdiv Level" << level << "Requested. Current Max:" << currentMax;
if(level <= currentMax)
return;
......@@ -152,7 +152,7 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
precomputeVertexTable(tables, vb, ib);
tables.index_regular = getPatchIndexBuffer(ib);
qCInfo(log_subdiv) << "Precompute Tables Done";
qCDebug(log_subdiv) << "Precompute Tables Done";
return tables;
}
......@@ -548,7 +548,7 @@ bool Subdivision::matchAndCompleteTriangle(unsigned int sx, unsigned int sy, uns
}
Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
qCInfo(log_subdiv) << "Running compute shader";
qCDebug(log_subdiv) << "Running compute shader";
Result result;
......
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