still working on obj loader, trying to maintain regular pushes to git.

This commit is contained in:
michal
2014-10-03 22:35:17 -04:00
parent d2c13eb104
commit 9eaf25f38c
3 changed files with 264 additions and 36 deletions

View File

@@ -52,15 +52,35 @@ public:
void render(const RenderData& data) override;
void update(const UpdateData& data) override;
typedef struct
{
GLfloat location[3];
GLfloat tex[2];
GLfloat normal[3];
/* GLfloat color[4];
GLfloat attribute[3];
GLfloat float_attribute;*/
//GLubyte padding[4]; // Pads the struct out to 64 bytes for performance increase
} Vertex;
protected:
void loadTexture();
void loadObj(const char *filename);
private:
properties::StringProperty _colorTexturePath;
ghoul::opengl::ProgramObject* _programObject; // remember to add shaders!
ghoul::opengl::Texture* _texture;
planetgeometry::PlanetGeometry* _geometry; // < -- change
GLuint _vaoID = 6;
GLuint _vBufferID = 7;
GLuint _iBufferID = 8;
GLenum _mode;
unsigned int _isize;
unsigned int _vsize;
Vertex *_varray;
int *_iarray;
glm::dmat3 _stateMatrix; // might need this

View File

@@ -67,8 +67,7 @@ namespace planetgeometry {
} // namespace planetgeometry
namespace renderablewavefrontobject {
const std::string keyGeometry = "Geometry";
const std::string keyFrame = "Frame";
const std::string keyObjFile = "ObjFile";
} // namespace renderableplanet
namespace renderablestars {