Jump to content
  • Advertisement
Sign in to follow this  
Pinzix

From blender to opengl

This topic is 4744 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How i can use a 3d model made with blender in a program that use the opengl? In particular i' ve used SDL.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
You have to load the model data yourself (ie. vertices, colors, texture coordinates, textures and so on), since OpenGL is a Graphics Library only (and SDL is by itself low-level, meaning it doesn't provide such functionality). To do this you must first research the Blender file format (assuming you are saving with the default options). Alternatively, you could use the export options in the file menu, to create a model in a format that is easier to load (for example raw triangles).

In any case, it is up to you to write the loading code. If this seems too much, you could try searching for a library that can do the work for you, or use a 3d engine like Ogre3d, Irrlicht or Crystalspace (to name a few).

Share this post


Link to post
Share on other sites
I'm quite sorry for the mess, I thought I was logged in. If a moderator would be so kind to delete the double-post?

Share this post


Link to post
Share on other sites
Hi, I made a loader for what must be the lowest level model export format ever, the .obj export format in Blender (Keep in mind that this is NOT the wavefront .obj, Blender developers I think wanted to confuse people like you and me that way [wink]). If you want it I could PM it to you, just holler.

EDIT: This particular format does not export materials or texture coordinates, only vertices and polygons. If you want a complete model loading system, I would suggest writing a loader (or finding a library that does that for you) for the ac3d model format.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thx for the suggestion. Anyway it's quite strange that are not available a program that made the conversion from blender model (or other format) into the c++ code for the opengl.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!