This commit is contained in:
Ben
2019-02-22 21:55:53 +00:00
parent 8efb410bcd
commit a170621eea
41 changed files with 462671 additions and 462656 deletions

View File

@@ -9,7 +9,9 @@ Mesh::Mesh(std::string objPath) {
}
Mesh::Mesh(objl::Mesh objMesh) {
OBJLtoGLM(objMesh.Vertices, vertices);
// objMesh.Vertices includes normals, positions and texcoords
// it must convert them to the neccesary GLM shit
}
void Mesh::loadFromObj(objl::Mesh objmesh) {

View File

@@ -12,6 +12,8 @@
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "./util/util.h"
class Shader;
class Mesh {
@@ -30,7 +32,6 @@ public:
GLuint VAOid;
std::vector<glm::vec3> vertices;
std::vector<glm::vec4> colours;
std::vector<glm::vec2> texCoords;
std::vector<glm::vec3> normals;
std::vector<GLuint> indices;

3
src/util/util.cpp Normal file
View File

@@ -0,0 +1,3 @@
#include "util.h"

9
src/util/util.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef SMHENGINE_SRC_UTIL_UTIL_H_
#define SMHENGINE_SRC_UTIL_UTUL_H_
template <typename T, typename P>
void OBJLtoGLM(T& inVec, P& outVec) {
}
#endif