Question about Blender Source Code

Hello Blender Community,

I have a rather simple question that I suspect can be answered quite quickly:

I am beginning to teach myself some application programming, and it is my understanding that Blender is a very well-written piece software. I run Mac OSX 10.6, so I can open the xcodeproj and study its workings.

Couple questions:

  1. Why can’t I “build and run” Blender?
  2. Blender does not appear to be written in the Cocoa framework or constructed via interface builder, and yet it has a GUI. How is this accomplished?
    I am very new to programming, so forgive my simple question.
  3. It looks like there is something related to qhull inside of Blender. How do I access qhull methods from within blender?

Thanks very much,
-ejang

Ejang, if I recall correctly, Blender uses a custom-built OpenGL-powered GUI toolkit called Ghost. On OS X, Ghost just hooks into Cocoa far enough to access the event loop / create the main window, then handles everything else itself. This allows Blender to be used on many different platforms.

As for building, you can’t build/run through xcode immediately – as per the Building Blender wiki page, you need to use CMake to generate the xcode project, or you can use SConstruct (scons) instead, as a commandline tool. I personally prefer SCons, but my background was Unix before I used OS X, so your milage may vary.

Thanks a lot for ur sharing.
I find this really helpful

ah, thanks Alterscape…

I’m not very familiar with OpenGL, but I think your post clears up a lot of things. Thanks for sharing the page, it saved me the trouble of using Google :stuck_out_tongue: and a 10 second search. (*sorry)

… imagine if Blender was designed in Apple’s Interface Builder instead, or Microsoft Visual Studio. Yuck!

-ejang