glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)
function call. To turn off wireframe and solidly render primitives use
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL) .