mirror of
https://github.com/ConjureETS/LOG750-LAB2.git
synced 2026-03-24 03:21:19 +00:00
Dragon ballsie
This commit is contained in:
parent
2b38d0b793
commit
0663336b94
@ -153,16 +153,6 @@ void Viewer::draw()
|
|||||||
|
|
||||||
modelViewMatrix.rotate(30,0,1,0);
|
modelViewMatrix.rotate(30,0,1,0);
|
||||||
|
|
||||||
|
|
||||||
glBindVertexArray(m_VAOs[VAO_Sphere]);
|
|
||||||
m_program->setUniformValue(m_isSkyLoc, false);
|
|
||||||
m_program->setUniformValue(m_mvMatrixLocation, modelViewMatrix);
|
|
||||||
m_program->setUniformValue(m_normalMatrixLoc, modelViewMatrix.normalMatrix());
|
|
||||||
m_program->setUniformValue(m_colorLocation, QColor(255, 255, 255, 255));
|
|
||||||
m_program->setUniformValue(m_drawTextLoc, false);
|
|
||||||
|
|
||||||
glDrawElements(GL_TRIANGLES, numTriSphere * 3, GL_UNSIGNED_INT, 0);
|
|
||||||
|
|
||||||
m_program->setUniformValue(m_projMatrixLocation, projectionMatrix);
|
m_program->setUniformValue(m_projMatrixLocation, projectionMatrix);
|
||||||
m_program->setUniformValue(m_mvMatrixLocation, modelViewMatrix);
|
m_program->setUniformValue(m_mvMatrixLocation, modelViewMatrix);
|
||||||
|
|
||||||
@ -277,7 +267,7 @@ void Viewer::init()
|
|||||||
|
|
||||||
SceneGroup *c = new SceneGroup();
|
SceneGroup *c = new SceneGroup();
|
||||||
c->addChild(cube);
|
c->addChild(cube);
|
||||||
//c->addChild(selection);
|
c->addChild(selection);
|
||||||
root.addChild(c);
|
root.addChild(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -483,7 +473,7 @@ void Viewer::initGeometries()
|
|||||||
|
|
||||||
GLfloat sphereVertices[numVerticesSphere][3];
|
GLfloat sphereVertices[numVerticesSphere][3];
|
||||||
GLfloat sphereNormals[numVerticesSphere][3];
|
GLfloat sphereNormals[numVerticesSphere][3];
|
||||||
GLfloat sphereIndices[numTriSphere * 3][3];
|
GLuint sphereIndices[numTriSphere * 3][3];
|
||||||
|
|
||||||
// Create Sphere
|
// Create Sphere
|
||||||
// Generate surrounding vertices
|
// Generate surrounding vertices
|
||||||
@ -619,7 +609,6 @@ void Viewer::initGeometries()
|
|||||||
|
|
||||||
void Viewer::visit(Cube &s)
|
void Viewer::visit(Cube &s)
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
QMatrix4x4 modelViewMatrix = modelStack.top() * QMatrix4x4(s.transform);
|
QMatrix4x4 modelViewMatrix = modelStack.top() * QMatrix4x4(s.transform);
|
||||||
|
|
||||||
int faces = floor(numVerticesCube/6);
|
int faces = floor(numVerticesCube/6);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user