You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
647 B

/*
* mesh.h
* - wrapper for assimp http://www.assimp.org
*/
#pragma once
#include <glm/glm.hpp>
#include "util.h"
struct meMeshInfo
{
glm::mat4 model_transform;
uint num_vertices = 0;
glm::vec3* vertices = nullptr;
glm::vec3* normals = nullptr;
uint num_indices = 0;
uint* indices = nullptr;
glm::vec3 diffuse_color;
};
struct meMeshGroup
{
bool use_normals = false;
uint num_meshes = 0;
meMeshInfo** meshes = nullptr;
// animation/bonemapping info here...
};
bool meInitAssimp();
bool meLoadFromFile(const char* filename, meMeshGroup& mesh_group);
void meFreeMeshGroup(meMeshGroup& mesh_group);
void meShutdownAssimp();