#include #include #include "utils.h" #include #include #include #include #include #include #include #include "Sphere.h" #define numVAOs 1 #define numVBOs 3 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); void setupVertices(void) { // 36 vertices, 12 triangles, makes 2x2x2 cube placed at origin 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