All pastes #231846 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-11-01 02:12 UTC
rendered paste body
void Body::Apply_Material(AppTest* app, std::string mat_name ) { 
	iMaterialList* materiallist;
	iMaterialWrapper* mat;

	csRef<iEngine> 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?