We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您可能对(不幸命名的)Assimp 库感兴趣。虽然它本身不是一个(快速)解析器,但您可以使用它来生成一种易于解析的格式,该格式仅包含您正在使用的数据,并且它可以加载很多格式。
如果您想自己解析该文件,OBJ 文件格式非常简单,这会有所帮助。我建议采用同样简单的方法 - 只需将所有顶点放入顶点缓冲区并创建一个索引缓冲区即可使用。然后使用顶点缓冲区对象/索引缓冲区对象进行渲染并绘制索引三角形。
You might be interested in the (unfortunately named) Assimp library. While it is not a (fast) parser in and of itself, you can use it to produce an easy to parse format that contains only the data you are using, and it can load a lot of formats.
If you wish to parse the file yourself, it helps that the OBJ file format is very simple. I reccomend taking an equally simple approach - just bring in all the vertices into a vertex buffer and create an index buffer to use. Then render using Vertex Buffer Objects / Index Buffer Objects and just draw indexed triangles.