/* * mesh.h * - wrapper for assimp http://www.assimp.org */ #pragma once #include #include "animation.h" #include "util.h" #include "util_image.h" struct meMeshInfo { glm::mat4 model_transform; uint num_vertices; glm::vec3* vertices; glm::vec3* normals; glm::vec3* texture_coords; // NOTE: using vec3 to stay aligned with other props uint num_indices; uint* indices; glm::vec3 diffuse_color; // TODO: move this to meMeshGroup bool use_texture; util_image diffuse_texture; node_animation* node_anim; }; struct meMeshGroup { bool use_normals; uint num_meshes; meMeshInfo** meshes; }; bool meInitAssimp(); bool meLoadFromFile(meMeshGroup& mesh_group, const char* filepath); void meFreeMeshGroup(meMeshGroup& mesh_group); void meShutdownAssimp();