Added support for model importing using assimp

This commit is contained in:
parax0
2015-08-10 09:47:00 -04:00
parent 4fc83f735b
commit 2967a483d9
11 changed files with 222 additions and 2 deletions

View File

@@ -10,6 +10,17 @@ CModel::CModel() : CBasicModel()
mTriangleCount = 0;
}
CModel::CModel(CMaterialSet *pSet, bool ownsMatSet)
{
mHasOwnMaterials = ownsMatSet;
mHasOwnSurfaces = true;
mVertexCount = 0;
mTriangleCount = 0;
mMaterialSets.resize(1);
mMaterialSets[0] = pSet;
}
CModel::~CModel()
{
if (mHasOwnMaterials)
@@ -99,6 +110,7 @@ void CModel::DrawSurface(ERenderOptions Options, u32 Surface, u32 MatSet)
// Draw IBOs
mVBO.Bind();
glLineWidth(1.f);
for (u32 iIBO = 0; iIBO < mSubmeshIndexBuffers[Surface].size(); iIBO++)
{

View File

@@ -20,7 +20,7 @@ class CModel : public CBasicModel
public:
CModel();
CModel(CMaterialSet *pSet);
CModel(CMaterialSet *pSet, bool ownsMatSet);
~CModel();
void BufferGL();