.. _program_listing_file_Src_GraphicsEngineOpenGL_scene_Mesh.hpp: Program Listing for File Mesh.hpp ================================= |exhale_lsh| :ref:`Return to documentation for file ` (``Src/GraphicsEngineOpenGL/scene/Mesh.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include #include "hostDevice/GlobalValues.hpp" #include "scene/Vertex.hpp" // this a simple Mesh without mesh generation class Mesh { public: Mesh(std::vector &vertices, std::vector &indices); Mesh(); void render(); std::vector getVertices() const { return this->vertices; } std::vector getIndices() const { return this->indices; } ~Mesh(); private: // render data // unsigned int VAO, VBO, EBO; enum { POSITION = 0, NORMAL = 1, COLOR = 2, TEXTURECOORD = 3 }; enum { POSITION_VB, NUM_BUFFERS }; // Vertex Array Object GLuint m_vao, m_ibo; // Vertex array buffer GLuint m_vab[NUM_BUFFERS]; uint32_t m_drawCount; std::vector vertices; std::vector indices; };