Jamie Foxx deploys his movie star charm judiciously and skillfully as a litigator with swagger to spare in “The Burial,” a very entertaining courtroom drama. Foxx is one of those actors, blessed with an allure and glamour that runs so deep it’s almost tempting to dismiss this performance as one that’s natural. If it looks effortless, we assume it is, denying them the work that goes into every role.

The same could be said for “The Burial,” which is glossy, appealing and goes down suspiciously easy. Is there a catch or did director and co-writer Maggie Betts just prove her commercial chops in her sophomore feature? (It’s the latter.) Just take a look at the poster used for its marketing campaign — a little retro, a little cheesy, and a lot self-aware. This movie and everyone involved knows what it is.

This story is a classic David versus Goliath one, in which a Biloxi funeral home owner, Tommy Lee Jones as Jeremiah O’Keefe, goes up against a billionaire, Raymond Loewen (Bill Camp). Both were children of funeral parlor owners, but O’Keefe stayed local while Loewen took the “death care” business corporate. He made a fortune acquiring funeral homes in Canada and the U.S. in anticipation of a “golden age of death,” in which the baby boomers start meeting their ends in mass numbers. “The Burial” is loosely based on a true story.

Betts focuses her lens on Foxx’s character, Willie E. Gary, a self-made success in personal injury law, who has never lost a case and doesn’t plan to. Jeremiah’s case is a contract one but a young associate played by the always appealing Mamoudou Athie convinces him that he’s going to need a lead counsel who is Black if they’re going to have a chance. The trial has been set for a poor, largely Black area, and Jeremiah’s longtime lawyer, Mike Allred (Alan Ruck), is an obvious racist. He’s working on it, he says chillingly to a team of Black lawyers.

When Willie does finally agree to go out of his comfort zone and take on a different kind of case (his ego stoked by the promise that this could make him as famous as Johnnie Cochran), there is a steep and humbling learning curve and a formidable opponent in Jurnee Smollett’s Ivy League-educated lawyer representing the Loewen Group.

Betts shares a screenwriting credit with Doug Wright, the Pulitzer- and Tony-winning playwright, who has been with the project for years. “The Burial” is assured and straightforward, and faces questions about race and privilege and inequality head on. This story is about two older white men fighting about a contract, sure, but Betts and Wright expand its scope with sensitivity and nuance. Like many good courtroom dramas before it, this case is bigger than just these two guys.

Smollett’s Mame is the big invention of the movie, which doesn’t grate the way it usually does when screenwriters add a fictional, exceptional woman to diversify a too-male story. Mame is not a one-note character — she is brilliant and accomplished but also keenly aware that she can’t stumble, falter or lose her cool the way her male counterparts can. Sometimes you even forget that you really shouldn’t be rooting for her to win, which is a shrewd touch for a movie with a pretty obvious conclusion and an easily hateable villain.

But this show belongs to Foxx, and it’s a fun feast to see him grandstand and doubt himself and charm all kinds of jurors and make us feel empathetic for a guy who is himself ostentatiously wealthy, no matter if it was easy for the actor or not.

MPA rating: R (for language)

Running time: 2:05

How to watch: In theaters, streaming Oct. 13 on Amazon Prime Video