Dragon ballsie

This commit is contained in:
unknown 2016-11-10 13:18:09 -05:00
parent 2b38d0b793
commit 0663336b94

View File

@ -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);