The basic concept of OpenGL and the method about how to program by using OpenGL based on MFC are introduced. Based on the Triangular Net Digital Terrain Model built by an effective data structure, the technique of producing 3D visual terrain is depicted, and the feasibility of this method is verified by an actual program example.