SMH
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
3
src/util/util.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#include "util.h"
|
||||
|
||||
|
||||
9
src/util/util.h
Normal file
9
src/util/util.h
Normal 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
|
||||
Reference in New Issue
Block a user