What is the most efficient way of creating buildings in OpenGL? I want to make a model of a town using OpenGL, but I’m not quite sure about how to model the buildings…
maybe i dont understand the question.
if you mean “the best and fast” way to draw a lot of models in ogl , i THINK the efficient way is to use display list.(i think your city have tons of building)
if u want realisic buildings the best way is to have someone able to use 3ds or something like that.
a simple look-like is to put some stupid cubes with nice textures on it.
You will have to draw geometry with polygons + handle collision tests.
I think he means modelling, then display using OpenGL.
One approach would be to use Animator (www.anim8or.com) to create your buildings, textures, etc. It’s free and easy to use.
I suggest creating all geometry as one monolithic object to make decoding easier.
Then, use Animator to export the scene to 3DS format.
Finally, write code to read and display the 3DS mesh using OpenGL.
Look at Display3DS (http://p-squared.com/Display3DS.php) for a simple example of free code that you can use as a starting point.
I think the best way to make a model of a town is to use a modeling package like maya or 3ds max and then export the town into a file. maya has a good ascii format (.obj) if you are not familiar with the 3ds binary format. There are however many tutorials that demonstrate how to load a 3ds model. If you dont have maya or 3ds i would suggest Milkshape 3d. Its a fee version that can export both .3ds and .obj