3D Game Engine Design and Implementation (16)

xiaoxiao2021-03-06  67

These days are reading the BSP file, of course, reading is not a problem, although this file format is very difficult to read. A index is connected to an index. Now the data has been read, but there is a problem with it to D3D. Because it is designed for OpenGL, its coordinates will be different. How can I modify to properly rendering to D3D? I am still considering. The BSP file is a flat-plane saved, which may be a triangle or a quadrilateral or other polygon. But only triangles in D3D are to converse more than three sides of the plane to a triangular list. At present, a plane has been implemented with an ID3DXMESH interface. If there are more than 1,000 planes inside, there will be more than 1,000 id3dxmesh objects. To create it directly from other data, you have to make a lot of work settings, such as how to fill in the vertices to Mesh, how to set the vertex index. Continue CODING ...

转载请注明原文地址:https://www.9cbs.com/read-88926.html

New Post(0)