With the Prince of Wales visiting Wimbledon for the first time since 1970, Federer was at his best Wednesday and beat Fognini 6-1, 6-3, 6-2.
Federer, a six-time winner at the All England Club, won 37 of 41 points on his first serve and 21 of 23 points at the net against Fognini, an Italian ranked 68th.
Prince Charles and the Duchess of Cornwall sat in the first row of the Royal Box as Federer walked onto Centre Court for the day's first match. He and Fognini stood side by side as they bowed awkwardly toward the royals, and Charles responded with a wave and a grin.
"They do brief you beforehand," Federer said. "I guess you don't do anything stupid. You behave. Obviously we were asked to bow, which is obviously no problem to do. We're thrilled for the tennis family that they came to watch Wimbledon today."
When Federer completed his victory, Charles and Camilla joined the crowd's applause. He visited with the royal couple afterward for several minutes, talking about tennis, polo and Federer's young twin daughters.
"They were very nice, very sweet and thought I played great," Federer said, "which was very nice to get some compliments after the match, which was unnecessary, but of course I do appreciate it."
Federer took only 23 minutes to win the first set and continued to pull away. The inconsistent Fognini fell to 1-16 against top-10 players but did manage some spectacular shots, and the players shared smiles after several improbable points that had the crowd roaring.
There was a brief moment of drama when Federer slipped behind the baseline after hitting a forehand. His legs splayed and his left knee landed hard on the grass.
"I'm fine," he said. "No pain, which is good. It could be dangerous with the left knee. I'm happy it was only basically a bruise to the ground, and not anything in the knee itself."
Seeded third, Federer hopes to end his 2½-year drought in major tournaments, and he's off to a good start, losing only nine games through two rounds. He seeks to add to his record total of 16 Grand Slam championships, and he could match the record of seven Wimbledon men's titles set by William Renshaw in the 1880s and tied by Pete Sampras in 2000.
"I'm just happy overall with how I'm playing," Federer said. "I'm serving well when I have to. I'm moving well. I feel like my forehand and backhand are working well. All of a sudden you win quite comfortably, but you have to focus until the very last point, and I'm happy as well with my concentration level."
Shortly after Federer's victory, rain interrupted play, and the retractable roof on Centre Court was closed for the first time in the tournament. More than 20 matches on outside courts were postponed until Thursday.
The weather forced Novak Djokovic to face American Ryan Harrison under the lights, but the defending champion managed the delay just fine. Djokovic closed out Day 3 with a 6-4, 6-4, 6-4 victory over Harrison.
The top-seeded Djokovic lost only four points on his second serve and saved all six break points he faced, but the match actually was much tighter than the score implies. Each man hit eight aces. Djokovic had one more winner, 31-30, and one more unforced error, 15-14. What made the difference? Djokovic converted 3-of-3 break points, and Harrison went 0 for 6.
"I was in trouble in the second set," Djokovic said. "It could have easily gone the other way."
With the schedule delayed because of afternoon rain, Djokovic and Harrison played under the retractable roof on Centre Court and finished their second-round match at 9:52 p.m.
"We went the distance," Djokovic said. "I'm honored to be in a position to play on the most recognized Centre Court worldwide in our sport. Every time I step on Centre Court, you can feel the different energy from any other tournament."
Djokovic has won three of the past four Grand Slam titles but was beaten this month in the French Open final by Rafael Nadal.
Three-time Wimbledon runner-up Andy Roddick, whose match Tuesday was delayed by weather, reached the second round by wrapping up a 7-6 (1), 6-4, 7-5 victory over 186th-ranked British wild-card entry Jamie Baker on Wednesday.
The 30th-seeded Roddick, whose title at the 2003 U.S. Open was the last for an American man at any Grand Slam tournament, and Baker were forced off court by wet weather in the second set Tuesday night. Then the resumption of their match was pushed back by a rain delay Wednesday.
Roddick broke Baker for a 6-5 lead in the final set, then served out the match, closing it with a 127 mph ace, his 14th. In the end, it took Roddick three hours over two days to advance.
No. 21-seeded Milos Raonic required only one game to complete his rain-interrupted first-round win over Santiago Giraldo, 6-4, 6-4, 6-4. No. 7 David Ferrer reached the second round by beating Dustin Brown 7-6 (5), 6-4, 6-4.
Meanwhile, American Mardy Fish said he declined interviews after his first-round victory Tuesday because of a stomach problem related to pain medication he's taking for his right arm -- and not related to his heart. He expects to be ready for his second-round match Thursday.
Fish spoke to reporters Wednesday, a day after he beat Ruben Ramirez Hidalgo in straight sets. It was the first match for Fish since a medical procedure in May to try to pinpoint an accelerated heartbeat.
Information from The Associated Press contributed to this report.