当前位置: 动力学知识库 > 问答 > 编程问答 >

opengl es - What is the best way to render blender model in Android?

问题描述:

I know there is way to parse Blender model by exporting it as OBJ (WaveFront) file and then parsing its (plaintext) contents, but this is silly when you're dealing with huge models. It just doesn't make sense to parse the file every time the application loads when the file itself is 5MB heavy (the obj file).

I came to an idea to parse it once and record all those coordinates into arrays and then just use them to draw the model, but not sure if this is the right way.

What is the recommended way to load Blender models into Android?

网友答案:

The whole point of a parser is to convert the data in the external file to an internal structure to be used by the application. You parse the data once and store it into useable variable types, which in your case would be float-/bytebuffers (assuming you are going the OpenGL route). It does make sense to parse the file every time the application loads as the buffers will be lost once the application is closed.

网友答案:

There isn't any official method; however, pre-parsing the file and storing the binary data is a great idea. I'd go with that.

分享给朋友:
您可能感兴趣的文章:
随机阅读: