changed loadfile and loadtexture to load() params
This commit is contained in:
parent
e999bf67b7
commit
1918cc89bf
17
WFObj.cc
17
WFObj.cc
@ -99,14 +99,8 @@ static void checkGLErrorLine(const char * function, int line)
|
|||||||
|
|
||||||
/****** WFObj functions ******/
|
/****** 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)
|
if (m_valid)
|
||||||
{
|
{
|
||||||
glDeleteBuffers(1, &m_data_vbo);
|
glDeleteBuffers(1, &m_data_vbo);
|
||||||
@ -131,8 +125,15 @@ void WFObj::clear()
|
|||||||
m_current_material_name = "";
|
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();
|
clear();
|
||||||
|
|
||||||
Buffer buff;
|
Buffer buff;
|
||||||
|
4
WFObj.h
4
WFObj.h
@ -60,11 +60,11 @@ public:
|
|||||||
enum { VERTEX, VERTEX_TEXTURE, VERTEX_NORMAL, VERTEX_TYPES };
|
enum { VERTEX, VERTEX_TEXTURE, VERTEX_NORMAL, VERTEX_TYPES };
|
||||||
|
|
||||||
/* constructors */
|
/* constructors */
|
||||||
WFObj(loadfile_t lf = NULL, loadtexture_t lt = NULL);
|
WFObj();
|
||||||
~WFObj();
|
~WFObj();
|
||||||
|
|
||||||
/* methods */
|
/* methods */
|
||||||
bool load(const char *fname);
|
bool load(const char *fname, loadfile_t lf = NULL, loadtexture_t lt = NULL);
|
||||||
bool load(const Buffer &buff);
|
bool load(const Buffer &buff);
|
||||||
const float * const getAABB() { return m_aabb; }
|
const float * const getAABB() { return m_aabb; }
|
||||||
size_t getStride() { return sizeof(GLfloat) * m_n_floats_per_vref; }
|
size_t getStride() { return sizeof(GLfloat) * m_n_floats_per_vref; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user