//setup triangle geometry
//setup triangle vertices
vertices[0].color=glm::vec3(1,0,0);
vertices[1].color=glm::vec3(0,1,0);
vertices[2].color=glm::vec3(0,0,1);
vertices[0].position=glm::vec3(-1,-1,0);
vertices[1].position=glm::vec3(0,1,0);
vertices[2].position=glm::vec3(1,-1,0);
//setup triangle indices
indices[0] = 0;
indices[1] = 1;
indices[2] = 2;
//setup triangle geometry
//setup triangle vertices
vertices[0].color=glm::vec3(1,0,0);
vertices[1].color=glm::vec3(0,1,0);
vertices[2].color=glm::vec3(0,0,1);
vertices[0].position=glm::vec3(-1,-1,0);
vertices[1].position=glm::vec3(0,1,0);
vertices[2].position=glm::vec3(1,-1,0);
//setup triangle indices
indices[0] = 0;
indices[1] = 1;
indices[2] = 2;
To copy to clipboard, switch view to plain text mode
Bookmarks