mirror of
https://github.com/ConjureETS/LOG750-LAB2.git
synced 2026-03-25 12:01:21 +00:00
i give up
This commit is contained in:
parent
d73b7f19dd
commit
608172b640
@ -200,8 +200,6 @@ void Viewer::deselect(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Viewer::mouseReleaseEvent(QMouseEvent* e) {
|
void Viewer::mouseReleaseEvent(QMouseEvent* e) {
|
||||||
m_program->bind();
|
|
||||||
m_program->setUniformValue(m_isPickingModeLoc, false);
|
|
||||||
//cout << "Viewer::mouseReleaseEvent(QMouseEvent* e)" << endl;
|
//cout << "Viewer::mouseReleaseEvent(QMouseEvent* e)" << endl;
|
||||||
//m_program->setUniformValue(m_isPickingModeLoc, false);
|
//m_program->setUniformValue(m_isPickingModeLoc, false);
|
||||||
QGLViewer::mouseReleaseEvent(e);
|
QGLViewer::mouseReleaseEvent(e);
|
||||||
@ -603,13 +601,13 @@ void Viewer::visit(Cube &s)
|
|||||||
m_program->setUniformValue(m_isSkyLoc, false);
|
m_program->setUniformValue(m_isSkyLoc, false);
|
||||||
m_program->setUniformValue(m_mvMatrixLocation, modelViewMatrix);
|
m_program->setUniformValue(m_mvMatrixLocation, modelViewMatrix);
|
||||||
m_program->setUniformValue(m_normalMatrixLoc, modelViewMatrix.normalMatrix());
|
m_program->setUniformValue(m_normalMatrixLoc, modelViewMatrix.normalMatrix());
|
||||||
m_program->setUniformValue(m_colorLocation, *(new QColor(255, 255, 0)));
|
m_program->setUniformValue(m_colorLocation, *(new QColor(s.getColor().rgb()+i)));
|
||||||
m_program->setUniformValue(m_drawTextLoc, true);
|
m_program->setUniformValue(m_drawTextLoc, true);
|
||||||
m_program->setUniformValue(m_isLightLoc, false);
|
m_program->setUniformValue(m_isLightLoc, false);
|
||||||
|
|
||||||
//glDrawArrays(GL_TRIANGLES, i*6, 6);
|
glDrawArrays(GL_TRIANGLES, i*6, 6);
|
||||||
}
|
}
|
||||||
glDrawArrays(GL_TRIANGLES, 0, 36);
|
//glDrawArrays(GL_TRIANGLES, 0, 36);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -723,9 +721,6 @@ Shape* Viewer::pickGeom(int x, int y){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glFlush();
|
|
||||||
drawSkybox();
|
|
||||||
modelStack.pop();
|
|
||||||
draw();
|
draw();
|
||||||
glFinish();
|
glFinish();
|
||||||
|
|
||||||
@ -750,8 +745,8 @@ Shape* Viewer::pickGeom(int x, int y){
|
|||||||
std::cout << "Picked Color: " << pickedColor->red() << " " << pickedColor->green() << " " << pickedColor->blue() << " " << pickedColor->alpha() << endl;
|
std::cout << "Picked Color: " << pickedColor->red() << " " << pickedColor->green() << " " << pickedColor->blue() << " " << pickedColor->alpha() << endl;
|
||||||
std::cout << "Picked Shape: " << pickedShape << endl;
|
std::cout << "Picked Shape: " << pickedShape << endl;
|
||||||
|
|
||||||
//m_program->setUniformValue(m_isPickingModeLoc, false);
|
m_program->setUniformValue(m_isPickingModeLoc, false);
|
||||||
//isPickingActivated = false;
|
isPickingActivated = false;
|
||||||
|
update();
|
||||||
return pickedShape;
|
return pickedShape;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user