#include #include #include "utils.h" #include #include #include #include #include #include #include #include "Sphere.h" #include "Torus.h" #define numVAOs 1 #define numVBOs 8 GLuint renderingProgram; GLuint vao[numVAOs]; GLuint vbo[numVBOs]; glm::vec3 camera; GLuint mvLoc,projLoc; int width, height; float aspect; glm::mat4 mMat, pMat, vMat, mvMat; std::stacktransforms; GLuint pyrTex; Sphere sphere(48); Torus torus(0.5,0.2,48); void setupVertices(void) { glGenVertexArrays(1, vao); glBindVertexArray(vao[0]); glGenBuffers(numVBOs, vbo); std::vectorindices=sphere.getIndices(); std::vectorvertices=sphere.getVertices(); std::vectoruvs=sphere.getTexCoords(); std::vectornormals=sphere.getNormals(); std::vectorpvalues; std::vectortvalues; std::vectornvalues; for(int i=0;i