World of Rigid Bodies (WoRB)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Main.cpp
Go to the documentation of this file.
00001 /**
00002  *  @file      Main.cpp
00003  *  @brief     The main entry point for both the stand-alone application.
00004  *  @author    Mikica Kocic
00005  *  @version   0.3
00006  *  @date      2012-05-10
00007  *  @copyright GNU Public License.
00008  */
00009 
00010 #include "WoRB.h"
00011 #include "Utilities.h"
00012 #include "WoRB_TestBed.h"
00013 
00014 /////////////////////////////////////////////////////////////////////////////////////////
00015 
00016 /** Definition of the static instance wrapper for our GLUT application.
00017  */
00018 template<class T> 
00019 T* WoRB::GLUT_Framework<T>::Application = 0;
00020 
00021 static WoRB_TestBed Application;
00022 static WoRB::GLUT_Framework<WoRB_TestBed> glut;
00023 
00024 /////////////////////////////////////////////////////////////////////////////////////////
00025 
00026 /** The main entry point for the stand-alone version.
00027  */
00028 int main( int argc, char* argv [] )
00029 {
00030     if ( ! glut.Initialize( &argc, argv ) ) {
00031         return 0;
00032     }
00033 
00034     Application.Initialize ();
00035     Application.SetupAnimation ();
00036 
00037     glut.Connect( Application );
00038 
00039     Application.Run ();
00040 
00041     glut.Terminate ();
00042 
00043     return 0;
00044 }
00045 
00046 /////////////////////////////////////////////////////////////////////////////////////////