Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

glutm/main.cpp

Go to the documentation of this file.
00001 #include "main.h"
00002 
00007 #include <glutm/master.h>
00008 
00009 #if defined(GLUTM_WIN32) && !defined(GLUTM_SAVER)
00010 
00011 #include <windows.h>
00012 
00013 int WINAPI   WinMain(HINSTANCE hInstance,
00014                      HINSTANCE hPrevInstance,
00015                      LPSTR lpCmdLine,
00016                      int nCmdShow)
00017 {
00018     GlutMaster::init();
00019 
00020     std::vector<std::string> arg;  // TODO
00021 
00022     if (GlutMain(arg))
00023         GlutMaster::mainLoop();
00024 
00025     // Never reaches here, but compiler is happy
00026     return EXIT_SUCCESS;
00027 }
00028 
00029 #endif
00030 
00031 int main(int argc,char** argv)
00032 {
00033     GlutMaster::init(argc,argv);
00034     
00035     bool ok;
00036 
00037     {
00038         // Convert args into vector of strings,
00039         // and free memory before going into
00040         // main GLUT loop
00041 
00042         std::vector<std::string> arg(argc);
00043         for (int i=0; i<argc; i++)
00044             arg[i] = argv[i];
00045         
00046         ok = GlutMain(arg);
00047     }
00048     
00049     if (ok)
00050         GlutMaster::mainLoop();
00051 
00052     // Never reaches here, but compiler is happy
00053     return EXIT_SUCCESS;
00054 }
00055 
00056 
00057 

Generated on Tue Nov 5 11:11:04 2002 for GLT by doxygen1.2.18