declear function to read aiMesh directlly from memory