Commit 12abe496 authored by stonecompass's avatar stonecompass
Browse files


parent 2d685590
#include <assimp/cimport.h> // Plain-C interface
#include <assimp/scene.h> // Output data structure
#include <assimp/postprocess.h> // Post processing flags
#include <assimp/cimport.h>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
bool import_file(char* file)
void print_node(aiNode *node, const aiScene *scene)
// Start the import on the given file with some example postprocessing
// Usually - if speed is not the most important aspect for you - you'll t
// probably to request more postprocessing than we do in this example.
const aiScene* scene = aiImportFile(file,
aiProcess_CalcTangentSpace |
aiProcess_Triangulate |
aiProcess_JoinIdenticalVertices |
// If the import failed, report it
printf("Node: %s\n", node->;
for (i32 i = 0; i < node->mNumMeshes; i++)
const struct aiMesh* mesh = scene->mMeshes[node->mMeshes[i]];
printf("%d: %s\n", i, mesh->;
for(i32 i = 0; i < node->mNumChildren; i++)
print_node(node->mChildren[i], scene);
// Currently loads any model file and prints all node- and mesh-name
b32 load_model_file(char* file_path)
const aiScene* scene = aiImportFile(file_path, aiProcess_CalcTangentSpace |
aiProcess_Triangulate |
aiProcess_JoinIdenticalVertices |
printf("%s\n", aiGetErrorString());
return false;
aiNode *root_node = scene->mRootNode;
print_node(root_node, scene);
// Now we can access the file's contents
//DoTheSceneProcessing( scene);
// We're done. Release all resources associated with this import
aiReleaseImport( scene);
return true;
......@@ -3,7 +3,6 @@
#include "assimp_loader.cpp"
#include "imgui/imgui.h"
#include "shared.h"
......@@ -61,6 +60,7 @@ static MemoryState memory_state;
#include "fmod_sound.cpp"
#include "filehandling.h"
#include "assimp_loader.cpp"
#include "shader_loader.cpp"
#include "render_pipeline.cpp"
#include "rendering.cpp"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment