The OpenGL programming is used to develop courseware in solid physics. Firstly, the OpenGL ‘s initialization and Release action at the end of program is a encapsulation of a GLScene control through the C++ Builder’s control development function and add it to the Compoment Palette. Then, according to requirements, some OpenGL function are packaged into a class. Finally, the designed face centre cubic lattice structure courseware is develped. The advantages are really 3d images can be got, the size, location and geometry exercise can be described strictly according to the given parameter or function, and can realize human-computer interaction, real-time describe.