You are here: Home Documentation Mac information page Using Coin3D
Document Actions

Using Coin3D

Coin itself is

Sc21

Sc21 (pronounced "Scandium", like the element) is used to integrate Coin applications with the system's user interface. Sc21 is built on Apple's Cocoa framework, allowing you to take advantage of the beauty and ease-of-use of Mac OS X' application kit by using Coin from Cocoa applications.

For more information about SC21, please go to the Sc21 overview page.

SoQt/Mac

The SoQt library is used to interface the core Coin library with the Mac OS X GUI. It is based on Trolltech's Qt user interface library. By using the combination of Coin, SoQt and Qt, you get an elegant and powerful solution for writing multiplatform 3D software, making it possible to port your applications between Mac OS X, Windows, and GNU/Linux by a simple recompile.

SoQt is dependent on Trolltech's Qt library. Qt/Mac is the Mac OS X native implementation of Qt, which is (similarly to Coin) available under both the GPL and a license for proprietary development.

The source of SoQt is available from the Coin ftp server. There is currently no binary distribution of SoQt available.

SoQt/X11

Instead of using Trolltech's Qt/Mac library, you can use Qt/X11 - the same version of Qt that is used on other UNIX systems. If you choose this option, you have to install Apple's X11 for Mac OS X first.

Complete instructions on how to set up X11, Qt/X11 and SoQt can be found in the README.MACOSX file in the SoQt/ source code repository.

Do-It-Yourself

You can also set up and control your own OpenGL canvas and do all GL setup, event handling, etc. yourself. Obviously, this means quite a bit of overhead compared to using one of the user interface bindings.

There is a simple example explaining how to do this, based on the GL utility toolkit ("GLUT"): glutiv.cpp. To compile and run this example, do the following:

  1. Open a Terminal window (/Applications/Utilities/Terminal.app).
  2. Copy the glutiv.cpp source file to a directory of your choice.
  3. Compile the example. If you have the CoinTools package installed, you can do this using the coin-config commandline utility.
    $ LDFLAGS="-framework GLUT -lobjc" coin-config --build-app glutiv glutiv.cpp
    
  4. Run the application:
    $ open glutiv.app