Commit of work up to day 11 of learnopengl.com.

This commit is contained in:
Zed A. Shaw 2026-08-21 13:15:55 -04:00
commit 5ce5b4dda4
447 changed files with 126678 additions and 0 deletions

View file

@ -0,0 +1,40 @@
#pragma once
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <stb_image.h>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <mesh.hpp>
#include <shader.hpp>
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <map>
#include <vector>
unsigned int TextureFromFile(const std::string& path, const std::string& directory, bool gamma = false);
struct Model {
std::vector<Texture> textures_loaded;
std::vector<Mesh> meshes;
std::string directory;
bool gammaCorrection;
Model(const char *path) {
loadModel(path);
}
void Draw(Shader &shader);
void loadModel(std::string path);
void processNode(aiNode *node, const aiScene *scene);
Mesh processMesh(aiMesh *mesh, const aiScene *scene);
std::vector<Texture> loadMaterialTextures(aiMaterial *mat, aiTextureType type, std::string typeName);
};