How to draw Google SketchUp model in my OpenGL app

I’m looking for example source code how to draw Google SketchUp 3D models in my OpenGL application (models like buildings,bridges and etc.)

Thanks in advance

Do you want to draw model created with SketchUp, or model object in your program like SkechUp does it?

If you want to import models, follow this steps:

  1. Draw whatever you want in SkechUp.

  2. Export it to .kmz file. File/Export/3D Model

  3. Rename .kmz to .zip and extract .dae file. It is a Collada file that contains your model.

  4. Download same open-source Collada loading library and include in your project.

  5. According to chosen library, load and display the model.

Thanks a lot for your answer

What I want is:
I have some SketchUp format building models and I want to display them in my OpenGL terrain rendering engine.

1.From your answer I understand that each single building model must be exported to kmz and then to extract Collada file from it?
(Hhhmm …it could be pretty much work for creating a city scene…)

2.Is converting to kmz->Collada the only option to do it?

3.Where can I find source code samples or sample applications and more information on drawing these models in OpenGL engine?

No, you can export the whole scene at once (as a single object). But before doing that, inport in SketchUp part of your height field (terrain) so that buildings can be properly positioned.

No, but it is perhaps the easiest way.

There are many different libraries. I don’t want to suggest any of them, because (probably) all of them have some bugs and strengths. Try to use Google to find libraries for your programming language and platform.

Thanks again.