DalTXColtsFan
03-03-2003, 05:42 AM
Or any other modelfile format for that matter.
Obviously in the cases of 3ds or md2 you get the benefit of being an industry standard, and the possibility that your models can be reused easily, and you get the advantage of having the model data in an external file instead of in your source code.
But I was looking at the code for loading a 3ds file from GameTutorials.com, and also the MD2 example from the book OpenGL Game Programming. Unless I'm missing something, it looks like all they're doing is loading the data into collections of classes or structs in memory - they're still calling glVertex3f for every single vertex in the file. Do you really gain anything performancewise from that over having the objects in your code, or even having them in vertex arrays?
Thoughts appreciated!
Thanks
Obviously in the cases of 3ds or md2 you get the benefit of being an industry standard, and the possibility that your models can be reused easily, and you get the advantage of having the model data in an external file instead of in your source code.
But I was looking at the code for loading a 3ds file from GameTutorials.com, and also the MD2 example from the book OpenGL Game Programming. Unless I'm missing something, it looks like all they're doing is loading the data into collections of classes or structs in memory - they're still calling glVertex3f for every single vertex in the file. Do you really gain anything performancewise from that over having the objects in your code, or even having them in vertex arrays?
Thoughts appreciated!
Thanks