changing obj loader to tinyobj

This commit is contained in:
Michal Marcinkowski
2015-02-22 13:10:47 -05:00
parent 423d778480
commit cc65ce1167
8 changed files with 898 additions and 151 deletions

View File

@@ -69,6 +69,8 @@ private:
std::string _source;
std::string _destination;
properties::BoolProperty _performShading;
};
} // namespace openspace

View File

@@ -26,6 +26,7 @@
#define __WAVEFRONTOBJECT_H__
#include <openspace/rendering/model/modelgeometry.h>
#include <openspace/util/tiny_obj_loader.h>
namespace openspace {
@@ -51,15 +52,20 @@ public:
//GLubyte padding[4]; // Pads the struct out to 64 bytes for performance increase
} Vertex;
std::vector<tinyobj::shape_t> shapes;
std::vector<tinyobj::material_t> materials;
protected:
void loadObj(const char *filename);
private:
void createSphere();
GLuint _vaoID = 6;
GLuint _vBufferID = 7;
GLuint _iBufferID = 8;
GLuint _vaoID;
GLuint _vBufferID;
GLuint _iBufferID;
GLuint _tBufferID;
unsigned int _tsize;
float* _tarray;
unsigned int _isize;
unsigned int _vsize;