untitled/include/loader.hpp
2025-07-30 13:14:22 +01:00

23 lines
621 B
C++

#ifndef LOADER_HPP
#define LOADER_HPP
// Includes
#include <fstream>
#include <iostream>
// Obj struct
struct Obj {
float* vertices; // Pointer to vertex data
size_t vertex_count; // Number of vertices
float* normals; // Pointer to normal data
size_t normal_count; // Number of normals
float* texcoords; // Pointer to texture coordinate data
size_t texcoord_count; // Number of texture coordinates
unsigned int* indices; // Pointer to index data
size_t index_count; // Number of indices
};
// Function to load an OBJ file
Obj load_obj(const std::string& filename);
#endif // LOADER_HPP