void Body::Apply_Material(AppTest* app, std::string mat_name ) { iMaterialList* materiallist; iMaterialWrapper* mat; csRef engine = app->GetEngine(); if (!engine) printf("Body::Apply_Material: Failed to locate iEngine renderer!\n"); materiallist = engine->GetMaterialList(); mat = materiallist->FindByName( mat_name.c_str() ); if ( !mat ) { printf("Body::Apply_Material: Material %s not found!\n", mat_name.c_str() ); } else { // Now add the texture to the mesh if (!mesh->GetMeshObject ()->SetMaterialWrapper (mat)) printf ("Body::Apply_Material:: Error SetMaterialWrapper failed\n") ; } // end no material } get this out put from function body::Apply_Material:: Error SetMaterialWrapper failed anyone got any ideas?