  We apply the proposal of Dijkgraaf and Vafa to analyze N=1 gauge theory with
SO(N) and Sp(N) gauge groups with arbitrary tree-level superpotentials using
matrix model techniques. We derive the planar and leading non-planar
contributions to the large M SO(M) and Sp(M) matrix model free energy by
applying the technology of higher-genus loop equations and by straightforward
diagrammatics. The loop equations suggest that the RP^2 free energy is given as
a derivative of the sphere contribution, a relation which we verify
diagrammatically. With a refinement of the proposal of Dijkgraaf and Vafa for
the effective superpotential, we find agreement with field theory expectations.
