Blender & OpenGL

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
mickey.l
Posts: 0
Joined: Fri Nov 18, 2005 11:43 am

Blender & OpenGL

Post by mickey.l »

Hi to all,
I have to make a project in c++ using GLUT and Blender.
There is someone that know how can I export the 3D models from blender and import them in my source code?
What are the commands in c++?

zupermonkey
Posts: 0
Joined: Tue Jul 06, 2004 1:13 pm

Post by zupermonkey »

Just export to a Wavefront .obj file and use that instead.

Why? Because loading Blender files directly is most probably not going to be easy, while .obj files are piece of cake.

There's also a lot of tutorials on the web that use the .obj format to load a file, you can find them at NeHe, gametutorials, etc, etc.

SirDude
Posts: 233
Joined: Sun Oct 13, 2002 7:37 pm
Location: University of Minnesota (USA)
Contact:

Post by SirDude »

There have been a number of OGL exporters written as well.
If you do a search for them I'm sure you will find them.

You could also just use the raw exporter that is provided with blender
and write the GL to read that file in.

theeth
Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Post by theeth »

zupermonkey wrote:Just export to a Wavefront .obj file and use that instead.

Why? Because loading Blender files directly is most probably not going to be easy, while .obj files are piece of cake.

There's also a lot of tutorials on the web that use the .obj format to load a file, you can find them at NeHe, gametutorials, etc, etc.
Actually, obj is not a very well defined format, so you'll have to make your parser jump through hoops if you want to support all the variations use on all the tuts on the web.

RAW, as suggested by SirDude, is probably the simplest format you can use.

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

Post Reply