matf-rg-engine 1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
engine::resources::Mesh Class Reference

Represents a mesh in the model in the OpenGL context. More...

#include <Mesh.hpp>

Public Member Functions

void draw (const Shader *shader)
 Draws the mesh using a given shader. Called by the Model::draw function to draw all the meshes in the model.
 
void destroy ()
 Destroys the mesh in the OpenGL context.
 

Private Member Functions

 Mesh (const std::vector< Vertex > &vertices, const std::vector< uint32_t > &indices, std::vector< Texture * > textures)
 Constructs a Mesh object.
 

Private Attributes

uint32_t m_vao {0}
 
uint32_t m_num_indices {0}
 
std::vector< Texture * > m_textures
 

Friends

class AssimpSceneProcessor
 

Detailed Description

Represents a mesh in the model in the OpenGL context.

Constructor & Destructor Documentation

◆ Mesh()

engine::resources::Mesh::Mesh ( const std::vector< Vertex > &  vertices,
const std::vector< uint32_t > &  indices,
std::vector< Texture * >  textures 
)
private

Constructs a Mesh object.

Parameters
verticesThe vertices in the mesh.
indicesThe indices in the mesh.
texturesThe textures in the mesh.

Member Function Documentation

◆ draw()

void engine::resources::Mesh::draw ( const Shader shader)

Draws the mesh using a given shader. Called by the Model::draw function to draw all the meshes in the model.

Parameters
shaderThe shader to use for drawing.

◆ destroy()

void engine::resources::Mesh::destroy ( )

Destroys the mesh in the OpenGL context.

Friends And Related Symbol Documentation

◆ AssimpSceneProcessor

friend class AssimpSceneProcessor
friend

Member Data Documentation

◆ m_vao

uint32_t engine::resources::Mesh::m_vao {0}
private

◆ m_num_indices

uint32_t engine::resources::Mesh::m_num_indices {0}
private

◆ m_textures

std::vector<Texture *> engine::resources::Mesh::m_textures
private

The documentation for this class was generated from the following files: