changed loadfile and loadtexture to load() params

This commit is contained in:
Josh Holtrop 2011-05-16 15:24:00 -04:00
parent e999bf67b7
commit 1918cc89bf
2 changed files with 11 additions and 10 deletions

View File

@ -99,14 +99,8 @@ static void checkGLErrorLine(const char * function, int line)
/****** WFObj functions ******/
WFObj::WFObj(loadfile_t lf, loadtexture_t lt)
WFObj::WFObj()
{
m_loadfile = lf;
m_loadtexture = lt;
if (m_loadfile == NULL)
{
m_loadfile = loadfile;
}
if (m_valid)
{
glDeleteBuffers(1, &m_data_vbo);
@ -131,8 +125,15 @@ void WFObj::clear()
m_current_material_name = "";
}
bool WFObj::load(const char *fname)
bool WFObj::load(const char *fname, loadfile_t lf, loadtexture_t lt)
{
m_loadfile = lf;
m_loadtexture = lt;
if (m_loadfile == NULL)
{
m_loadfile = loadfile;
}
clear();
Buffer buff;

View File

@ -60,11 +60,11 @@ public:
enum { VERTEX, VERTEX_TEXTURE, VERTEX_NORMAL, VERTEX_TYPES };
/* constructors */
WFObj(loadfile_t lf = NULL, loadtexture_t lt = NULL);
WFObj();
~WFObj();
/* methods */
bool load(const char *fname);
bool load(const char *fname, loadfile_t lf = NULL, loadtexture_t lt = NULL);
bool load(const Buffer &buff);
const float * const getAABB() { return m_aabb; }
size_t getStride() { return sizeof(GLfloat) * m_n_floats_per_vref; }