What’s big, green, solitary, irascible, and at least three times as funny and endearing as the Grinch? It’s the oddly lovable ogre who’s the title character in this summer’s absolutely delightful animated offering from the folks at DreamWorks. Smart, sassy and chockablock with witty references to pop culture past and present, “Shrek” is every bit as joyous a treat as last year’s “Chicken Run.”

Based on a children’s book by William Steig, “Shrek” tells the tale of a grumpy green giant who finds his swampy homestead–isolated, as he likes it–invaded by a horde of fairy-tale characters exiled from their abodes by arrogant Lord Farquaad, who’s turning his realm into a weirdly regimented amusement park. To recover his blissful solitude, Shrek contracts with the nasty nobleman to bring him a beautiful bride of royal blood, the princess Fiona, who just happens to be imprisoned in a castle guarded by a fire-breathing dragon. The ogre is accompanied on his quest by an unwelcome sidekick, a jive-talking donkey. The duo, needless to say, have to engage in an exciting battle to complete their task, and after it the affections of the princess veer off in none too surprising a direction. Suffice it to say that the old adages that beauty is only skin deep and that you can’t tell a book by its cover come into play to insure a happy ending.

On the surface “Shrek” may follow an old-fashioned fairy-tale route, but its irreverent tone is anything but ordinary. It’s both a homage to the Disney classics of the genre and a hilarious sendup of them: Snow White and the seven dwarfs, as well as Pinocchio and the three bears, make delightfully droll cameo appearances, and when Fiona enters into a duet with a trilling bluebird (as so many Disney heroines did), the musical punchline is hilarious. The scripters play with other incidental characters in wonderfully unexpected ways, too (the sight of the Gingerbread Man being tortured by Farquaad for information is topped only by his reappearance in the final ensemble), and among the principals the fact that Farquaad is notable for his small stature seems a particularly appropriate in-joke (after all, in their celebrated court case it was revealed that Disney’s Michael Eisner once referred to producer Jeffrey Katzenberg as a midget). Though it could hardly have been intentional, given the long lead-time necessary on such projects, the relationship between Shrek and his donkey pal even recalls that between Kuzco and Pacha in Disney’s recent charmer “The Emperor’s New Groove.” The ribbing is all good-natured, though (even the presentation of Farquaad’s utopia as a sort of Disneyland doesn’t come across as mean-spirited), and it adds spice to a screenplay that’s already rich in rollicking good humor and slapstick fun.

The picture looks great, too. The computer animation, of both the characters and the backgrounds, is state-of-the-art, an advance over the already-excellent “Antz” from a few years back and every bit as wondrous as what one finds in the “Toy Story” series. And the voice talent seems to be having a splendid time. Mike Myers is more restrained than you might expect as Shrek, but his Scottish burr gives the ogre a pleasantly odd edge. Eddie Murphy, on the other hand, is explosively funny as the donkey; his riffs are positively inspired (and, one suspects, partially improvised). John Lithgow brings his “3rd Rock from the Sun” exuberance to Lord Farquaad, and Carmen Diaz is right on as the princess (she’s also given, in addition to her song routine, another of the film’s best sight gags in a fight scene with an oddly Gallic Robin Hood). And though “Shrek” isn’t a musical, it makes clever use of some well-known tunes along the way.

One can register some mild complaints. Especially toward the beginning, the moments of yucky gross-out humor that kids seem to demand nowadays come a mite too frequently. A routine involving Robin Hood for some reason makes the bandit and his merry band French (and none too funny at that). And in the final act (before the big finale), the level of inspiration flags somewhat. Overall, though, the summer isn’t likely to offer anything to top “Shrek” as family entertainment. Kids will love it, and grownups may enjoy it even more. When viewers of all ages come out of a theatre beaming, what more could one ask?