#ifndef __GLMESH_H__ #define __GLMESH_H__ #include #include "PxPhysics.h" #include using namespace physx; class GLMesh{ public: GLMesh(GLuint elementTypei = GL_TRIANGLES); ~GLMesh(); void draw(); // For indices std::vector indices; std::vector vertices; std::vector normals; std::vector colors; std::vector texCoords; // treats as u v std::vector tangents; std::vector bitangents; // For raw std::vector rawVertices; std::vector rawNormals; void reset(); void genVBOIBO(); void updateVBOIBO(bool dynamicVB = true); void drawVBOIBO(bool enable = true, bool draw = true, bool disable = true, bool drawpoints = false); // For vertex buffer GLuint vbo; GLuint ibo; bool firstTimeBO; bool withTexture, withColor, withNormal, withTangent; GLuint elementType; }; #endif