examples/labirinto/openglwindow.cpp
void OpenGLWindow::loadModel(std::string_view path) {
  m_model.terminateGL();

  m_model.loadDiffuseTexture(getAssetsPath() + "maps/brick_base.jpg");
  m_model.loadNormalTexture(getAssetsPath() + "maps/brick_normal.jpg");
  m_model.loadObj(path);
  m_model.setupVAO(m_programs.at(m_currentProgramIndex));
  m_trianglesToDraw = m_model.getNumTriangles();

  // Use material properties from the loaded model
  m_Ka = m_model.getKa();
  m_Kd = m_model.getKd();
  m_Ks = m_model.getKs();
  m_shininess = m_model.getShininess();

  loadMaze();  // Carrega as posições dos blocos das paredes do labirinto
}
// Load model, usado para carregar os blocos das paredes do labirinto
Load model, usado para carregar os blocos das paredes do labirinto
Load model usado para carregar os blocos das paredes do labirinto
void OpenGLWindow::loadModel(std::string_view path) {
  m_model.terminateGL();
  m_model.loadDiffuseTexture(getAssetsPath() + "maps/brick_base.jpg");
  m_model.loadNormalTexture(getAssetsPath() + "maps/brick_normal.jpg");
  m_model.loadObj(path);
  m_model.setupVAO(m_programs.at(m_currentProgramIndex));
  m_trianglesToDraw = m_model.getNumTriangles();
  m_Ka = m_model.getKa();
  m_Kd = m_model.getKd();
  m_Ks = m_model.getKs();
  m_shininess = m_model.getShininess();
  loadMaze();  
}
void OpenGLWindow :: loadModel ( std :: string_view path ) { m_model . terminateGL ( ) ; m_model . loadDiffuseTexture ( getAssetsPath ( ) + " " ) ; m_model . loadNormalTexture ( getAssetsPath ( ) + " " ) ; m_model . loadObj ( path ) ; m_model . setupVAO ( m_programs . at ( m_currentProgramIndex ) ) ; m_trianglesToDraw = m_model . getNumTriangles ( ) ; m_Ka = m_model . getKa ( ) ; m_Kd = m_model . getKd ( ) ; m_Ks = m_model . getKs ( ) ; m_shininess = m_model . getShininess ( ) ; loadMaze ( ) ; }
Load model, usado para carregar os blocos das paredes do labirinto
Load model usado para carregar os blocos das paredes do labirinto
// Use material properties from the loaded model // Carrega as posições dos blocos das paredes do labirinto