Abstract:Starting from the analysis of difference between large scale ocean and terrain, the paper presents a level of detail(LOD) algorithm based on OpenGL index vertex array.A grid template is built with the viewdependent method.The template treats a grid as 8 normal rectangle areas and 4 repair areas of Tcracks and dynamically calculates index array for each area. By sending vertex array and index arrays of each grid to OpenGL, the template renders each grid of LOD efficiently. Then,a realtime vivid ocean waves scene is achieved by adopting the viewdependent method to decide which vertexes should be inverted by PM wave spectrum.