简体   繁体   中英

DirectX, Assimp model loader has mesh crash

I'm working on a model loader coded by DirectX 11 and Assimp(VS C++ 2012). It can successfully load some model files now, but there is a new error just like the picture: http://i.imgur.com/1XLCqG9.png

I had used assimp viewer to check the model file and it didn't show me any error.

So I guess there has some problems on my codes. D:

I have tryed to load another models and found that this problem occured only when I loaded a model which has more then 50K vertices.

Here is my full codes and the model: https://dl.dropboxusercontent.com/u/90323076/mesh%20crash.rar

Can anyone helps me? Thanks a lot.

I figured out why there would be the error.

Because I used WORD to store the index data, so it overflowed when the indices got more then 65535.

Changing the WORD to UINT had solved the problem!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM