Working on semi proper API to build a scene

This commit is contained in:
2022-07-09 21:22:50 +02:00
parent b7e3465406
commit f8b390923e
9 changed files with 116 additions and 55 deletions

View File

@ -1,7 +1,8 @@
#pragma once
#define TINYGLTF_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define TINYGLTF_IMPLEMENTATION
#define TINYGLTF_NO_EXTERNAL_IMAGE
#include "Graphics/Mesh.h"
@ -9,6 +10,7 @@
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <string>
#include "Scene/SceneNodeTypes.h"
void ProcessVertices(aiMesh* mesh, std::vector<BarinkEngine::Vertex>& out_vertices);
void ProcessIndices(aiMesh* mesh, std::vector<unsigned int>& out_indices);
@ -17,7 +19,9 @@ void ProcessIndices(aiMesh* mesh, std::vector<unsigned int>& out_indices);
class ModelImporter {
public:
std::vector<BarinkEngine::Mesh> Import(const std::string path);
SceneObject* Import(const std::string path);
private: