I don't know what the name of wow is. I gave a Code: "" (my friend's network name @_@)
This is the effect in modelviewer, and also the direction of hard work:
- 2009/3/2: Implement mesh Rendering
In fact, this is very simple. First read the modelheader from the file, read the vertex information based on the vertex offset and number of vertex numbers, and create a vertexbuffer.
Then, based on the modelview information (which is related to the legend of ?) Index offset and number in read data and create indexbuffer
Reads data of each submesh based on the number and offset of submesh in modelview.
Draw the submesh in sequence. (PS: the coordinate system here is estimated to be right-hand)
There are three Texture unit data in the model data of the knife. For details, see:
The first type = 2 indicates that the file name is not in this m2 file. The other two can be read based on the final offset address, as if it was a highlight texture.
Because I haven't Parsed the DBC file, I just took out the image and created it ........
The following figure shows the effect. The last two pasters are not attached, with no highlights or light: