object export questions / import in OpenGL

Hi,

i want to use blender to model some objects that i want to use in games (OpenGL based, C or C++).

Basically what i want to do is generate an object in blender, that object should have color/material/surface parameters that are also exported.

Now i’d like to know how i can do the following:

  • What file format would be best (simple structure, easy to read?)
  • is there an export script available that exports an object into a file or other data structur?
  • how can i embed that object into my own C or C++ programs?
  • is there some library or example code available that lets me draw that object in OpenGL?

It would be great if anybody could give me some hints on this question.

Best regards,
Torsten.

.obj is pretty simple, so are some of the .raw formats

that exactly what all the exporters do

write a loader that converts the file to triangle strips or an index buffer or whatever you want to render it as

you don’t know opengl!? all of the opengl tutorials cover that kind of thing

for a simplistic game I wrote I wrote my own exporter, this is pretty simple stuff

Hi,

thanks for your hints. Maybe my first posting was a bit unclear, or maybe a misunderstanding.

I’m known to OpenGL and have already written some games using OpenGL.

When i model an object in blender then i want everything that i modeled to be exported.

So when i use Bezier curves and not only meshes i want them also to be exported.
I also want to use colors / materials and i want them to be exported.

So i don’t only want to use meshes.

Is an export script that can handle this available?

Is a library or some code available that can draw such a complex object in OpenGL?

Best regards,
Torsten.