You were right, after i've added all .cpp files to the project and included An8Loader.h i've managed to compile everything but i get an warning (i've made it short taking only relevant information):
\liban8\AN8X_SkinnedMeshHelper.cpp In member function `void AN8XFigureHelper::ProcessNode(An8File*, std::vector<AN8XBone, std::allocator<AN8XBone> >*,
std::vector<AN8XObjectInstanceInFigure*, std::allocator<AN8XObjectInstanceInFigure*> >*, std::vector<An8Mesh*, std::allocator<An8Mesh*> >*,
std::vector<int, std::allocator<int> >*, std::vector<AN8XMATRIX, std::allocator<AN8XMATRIX> >*, std::vector<An8Material*, std::allocator<An8Material*> >*, int, An8Bone*, AN8XMATRIX*)':
[Warning] passing NULL used for non-pointer converting 1 of `void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = int, _Alloc = std::allocator<int>]'
The line that spawns this warning is present two times in AN8X_SkinnedMeshHelper.cpp and is this one:
MeshesListMaterialsID.push_back(NULL);
I've googled the warning and found some posts saying that it cannot convert from pointer to int and that i should use ptrnull instead but that also got me to an error:
\liban8\AN8X_SkinnedMeshHelper.cpp [Error] no matching function for call to `std::vector<int, std::allocator<int> >::push_back(const ptrnull_t&)'
Anyway, ignoring the warning i've tried rendering the model but i guess i'm doing something wrong there too... made a function by following the documentation that came with liban8 like this:
void LoadModel()
{
An8File an8File;
glLoadIdentity(); // Reset The View
glTranslatef(0.0f, 0.0f,-2.0f);
if( an8File.LoadFile(std::string((LPCTSTR)("test.an8"))) == false)
{
MessageBox(NULL,"Failed To Load Model.","ERROR",MB_OK|MB_ICONEXCLAMATION);;
}
// Compute mesh position in object space (avoid the need of translation)
an8File.ComputeAllPositions();
// Ungroup meshes (easier to manipulate)
an8File.Ungroup();
// Triangulize faces
an8File.Triangulize();
// Compute matices of camera, objects, Lights, ... from quaternions
an8File.ComputeAllMatrices();
// Computer integer id to joint texture and material (.an8 files use strings)
an8File.ComputeTextureIDForMaterial();
}
Then i've ran this function in Draw() but all i see on the screen is the quad i drew to make the program work before adding liban8.
Btw thank you for the help you provided so far.