replace m_data with m_vertices
This commit is contained in:
parent
594642f489
commit
f46f887472
5
WFObj.cc
5
WFObj.cc
@ -104,8 +104,8 @@ WFObj::~WFObj()
|
|||||||
|
|
||||||
void WFObj::clear()
|
void WFObj::clear()
|
||||||
{
|
{
|
||||||
m_data = std::vector< std::vector<std::string> >();
|
for (int i = 0; i < sizeof(m_vertices)/sizeof(m_vertices[0]); i++)
|
||||||
m_loadedVertex = false;
|
m_vertices[i].clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WFObj::load(const char *fname)
|
bool WFObj::load(const char *fname)
|
||||||
@ -193,7 +193,6 @@ GLuint WFObj::render(bool doTextureInfo, bool enableBlending)
|
|||||||
GLuint list = glGenLists(1);
|
GLuint list = glGenLists(1);
|
||||||
glNewList(list, GL_COMPILE);
|
glNewList(list, GL_COMPILE);
|
||||||
int len = m_data.size();
|
int len = m_data.size();
|
||||||
enum { VERTEX, VERTEX_TEXTURE, VERTEX_NORMAL, VERTEX_TYPES };
|
|
||||||
vector<Vertex> vertices[VERTEX_TYPES];
|
vector<Vertex> vertices[VERTEX_TYPES];
|
||||||
int numVertsLast = 0;
|
int numVertsLast = 0;
|
||||||
bool inFace = false;
|
bool inFace = false;
|
||||||
|
5
WFObj.h
5
WFObj.h
@ -48,6 +48,8 @@ public:
|
|||||||
WFObj * m_obj;
|
WFObj * m_obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum { VERTEX, VERTEX_TEXTURE, VERTEX_NORMAL, VERTEX_TYPES };
|
||||||
|
|
||||||
/* constructors */
|
/* constructors */
|
||||||
WFObj(loadfile_t lf = NULL, loadtexture_t lt = NULL);
|
WFObj(loadfile_t lf = NULL, loadtexture_t lt = NULL);
|
||||||
~WFObj();
|
~WFObj();
|
||||||
@ -80,10 +82,9 @@ protected:
|
|||||||
std::string getLine(const Buff & buff, size_t idx, size_t *update_idx);
|
std::string getLine(const Buff & buff, size_t idx, size_t *update_idx);
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
std::vector< std::vector<std::string> > m_data;
|
std::vector<Vector> m_vertices[VERTEX_TYPES];
|
||||||
FileLoader::Path m_path;
|
FileLoader::Path m_path;
|
||||||
float m_aabb[6];
|
float m_aabb[6];
|
||||||
bool m_loadedVertex;
|
|
||||||
loadfile_t m_loadfile;
|
loadfile_t m_loadfile;
|
||||||
loadtexture_t m_loadtexture;
|
loadtexture_t m_loadtexture;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user