Update mesh include class to match updated Mesh chapter.

This commit is contained in:
Joey de Vries
2020-04-29 15:46:23 +02:00
parent 481d9b7957
commit 8d8a449480

View File

@@ -9,9 +9,6 @@
#include <learnopengl/shader.h> #include <learnopengl/shader.h>
#include <string> #include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector> #include <vector>
using namespace std; using namespace std;
@@ -36,13 +33,12 @@ struct Texture {
class Mesh { class Mesh {
public: public:
/* Mesh Data */ // mesh Data
vector<Vertex> vertices; vector<Vertex> vertices;
vector<unsigned int> indices; vector<unsigned int> indices;
vector<Texture> textures; vector<Texture> textures;
unsigned int VAO; unsigned int VAO;
/* Functions */
// constructor // constructor
Mesh(vector<Vertex> vertices, vector<unsigned int> indices, vector<Texture> textures) Mesh(vector<Vertex> vertices, vector<unsigned int> indices, vector<Texture> textures)
{ {
@@ -93,10 +89,9 @@ public:
} }
private: private:
/* Render data */ // render data
unsigned int VBO, EBO; unsigned int VBO, EBO;
/* Functions */
// initializes all the buffer objects/arrays // initializes all the buffer objects/arrays
void setupMesh() void setupMesh()
{ {