Applying a texture to a cube
 
 
 

CreateScene() calls CreateCube(), which calls CreateCubeDetailed(), which calls AddTexture() only if the user has selected Texture in the UI:

void AddTexture(KFbxMesh* pMesh)
{
    // The Layer 0 and the KFbxLayerElementTexture has already been created
    // in the CreateCube function.
    pMesh->GetLayer(0)->GetDiffuseTextures()->
    GetDirectArray().Add(gTexture);
}