#include "Main.h"Aller au code source de ce fichier.
Fonctions | |
| int | main (int argc, char *argv[]) |
| void | InitFlux (void) |
| void | CreateManager (void) |
| void | SetManagerLink (void) |
| void | PreInitManager (void) |
| void | PostInitManager (void) |
| void | SetGlutCallBack (void) |
| void | keyboard (unsigned char key, int x, int y) |
| void | keyboardup (unsigned char key, int x, int y) |
| void | spekeyboard (int key, int x, int y) |
| void | spekeyboardup (int key, int x, int y) |
| void | Mouse (int button, int state, int x, int y) |
| void | Focus (int state) |
| void | MotionFunc (int x, int y) |
| void | PassiveMotionFunc (int x, int y) |
| void | SpaceballMotionFunc (int x, int y, int z) |
| void | SpaceballRotateFunc (int x, int y, int z) |
| void | TabletMotionFunc (int x, int y) |
| void | TabletButtonFunc (int button, int state, int x, int y) |
| void | display (void) |
| void | reshape (int w, int h) |
Variables | |
| int | fen |
|
|
|
Définition à la ligne 496 du fichier Main.cpp. Références ExManagerOutput::DrawScene(), et ManagerOutPut. Référencé par SetGlutCallBack().
00496 {ManagerOutPut->DrawScene();}
|
|
|
Définition à la ligne 489 du fichier Main.cpp. Références ExManagerInputGLUT::Focus(), et ManagerInputGLUT. Référencé par SetGlutCallBack().
00489 {ManagerInputGLUT->Focus(state);}
|
|
|
Définition à la ligne 97 du fichier Main.cpp. Références FluxAction, Guard, InitFlux(), et UnGuard. Référencé par InitFlux(), et main().
00098 {
00099 Guard(void InitFlux(void))
00100 Consol = new std::ostrstream;
00101 FluxAction = new ExCFluxAction;
00102 UnGuard
00103 }
|
|
||||||||||||||||
|
Définition à la ligne 484 du fichier Main.cpp. Références ExManagerInputGLUT::Key(), et ManagerInputGLUT. Référencé par SetGlutCallBack().
00484 {ManagerInputGLUT->Key(key,x,y);}
|
|
||||||||||||||||
|
Définition à la ligne 485 du fichier Main.cpp. Références ExManagerInputGLUT::KeyUp(), et ManagerInputGLUT. Référencé par SetGlutCallBack().
00485 {ManagerInputGLUT->KeyUp(key,x,y);}
|
|
||||||||||||
|
Définition à la ligne 27 du fichier Main.cpp. Références CreateManager(), ExManagerWindow::CreateNewWindow(), Guard, InitFlux(), ExManagerCommand::LoadFile(), m_FullScreen, ManagerCommand, ManagerWindow, PostInitManager(), PreInitManager(), ExManagerWindow::SetFullScreen(), SetGlutCallBack(), SetManagerLink(), et UnGuard.
00028 {
00029 Guard(int main(...))
00030 InitFlux();
00031 glutInit(&argc,argv);
00032 //glutInitDisplayMode(GLUT_RGBA|GLUT_SINGLE);
00033 //glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH|GLUT_DOUBLE);
00034 //glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA|GLUT_DEPTH|GLUT_ACCUM|GLUT_STENCIL);
00035 //glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA|GLUT_ALPHA|GLUT_ACCUM);
00036 //glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA|GLUT_ALPHA|GLUT_STENCIL );
00037 //glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA|GLUT_DEPTH|GLUT_STENCIL);
00038 glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA|GLUT_DEPTH);
00039
00040 CreateManager();
00041 SetManagerLink();
00042
00043 *Consol<<"****************************************"<<std::endl;
00044 *Consol<<"*Starting ExNihilo Engine *"<<std::endl;
00045 *Consol<<"****************************************"<<std::endl;
00046 //ManagerWindow->CreateNewWindow (options->getWindowResolutionX(), options->getWindowResolutionY (), 200, 200, argv[0]);
00047 //ManagerWindow->CreateNewWindow (640,480,argv[0]);
00048 //Check argument to load
00049
00050 try
00051 {
00052
00053 int x=1024,y=768;
00054 for(int i = 1; i < argc; i++)
00055 {
00056 if(argv[i])
00057 {
00058 std::cout<<argv[i]<<std::endl;
00059
00060 }
00061 }
00062 if(argc>2)
00063 {
00064 ManagerWindow->CreateNewWindow (atoi(argv[1]),atoi(argv[2]),argv[0]);
00065 }else ManagerWindow->CreateNewWindow (x,y,argv[0]);
00066
00067 if(atoi(argv[3])==1)m_FullScreen=true;
00068 else m_FullScreen=false;
00069
00070 ManagerWindow->SetFullScreen(m_FullScreen);
00071
00072 /*ManagerWindow->CreateNewWindow(1024,768,argv[0]);
00073 m_FullScreen=false;
00074 ManagerWindow->SetFullScreen(m_FullScreen);*/
00075 }catch (...)
00076 {
00077 std::cout<<"Full screen fail start in window mode"<<std::endl;
00078 }
00079 PreInitManager();
00080 SetGlutCallBack();
00081 PostInitManager();
00082
00083 *Consol<<"****************************************"<<std::endl;
00084 *Consol<<"*Lauching Engine *"<<std::endl;
00085 *Consol<<"****************************************"<<std::endl;
00086 //Check argument to load
00087 for(int i = 1; i < argc; i++) {
00088 if(argv[i]) {
00089 //std::cout<<argv[i]<<std::endl;
00090 ManagerCommand->LoadFile(argv[i]);
00091 }
00092 }
00093 glutMainLoop();
00094 return 0;
00095 UnGuard
00096 }
|
|
||||||||||||
|
Définition à la ligne 490 du fichier Main.cpp. Références ManagerInputGLUT, et ExManagerInputGLUT::MouseMotion(). Référencé par SetGlutCallBack().
00490 {ManagerInputGLUT->MouseMotion(x,y);}
|
|
||||||||||||||||||||
|
Définition à la ligne 488 du fichier Main.cpp. Références ManagerInputGLUT, et ExManagerInputGLUT::Mouse(). Référencé par SetGlutCallBack().
00488 {ManagerInputGLUT->Mouse(button,state,x,y);}
|
|
||||||||||||
|
Définition à la ligne 491 du fichier Main.cpp. Références ManagerInputGLUT, et ExManagerInputGLUT::MousePassiveMotion(). Référencé par SetGlutCallBack().
00491 {ManagerInputGLUT->MousePassiveMotion(x,y);}
|
|
|
Définition à la ligne 392 du fichier Main.cpp. Références Guard, ExManagerConsole::Init(), ExManagerOutput::Init(), ExManagerInterface::Init(), ExNihilo::InitBasicObjectList(), ManagerConsole, ManagerInterface, ManagerOutPut, PostInitManager(), ExManagerInterface::Reset(), et UnGuard. Référencé par main(), et PostInitManager().
00393 {
00394 Guard(void PostInitManager(void))
00395 ManagerConsole->Init();
00396 ExNihilo::InitBasicObjectList();
00397 ManagerOutPut->Init();
00398 ManagerInterface->Reset();
00399 ManagerInterface->Init();
00400 UnGuard
00401 }
|
|
|
Définition à la ligne 317 du fichier Main.cpp. Références ExManagerWindow::Apply(), ExManagerInputGLUT::CheckInput(), ExManagerInputGLUT::DisplayAviableInput(), ExManagerSound::DisplayAviableInput(), ExManagerWindow::GlutCallBack, Guard, ExManagerInputGLUT::Init(), ExManagerId::Init(), ExManagerVertexArrays::Init(), ExManagerVertexProgram::Init(), ExManagerTexture::Init(), ExManagerSound::Init(), ExManagerInterface::Init(), ExManagerSpirit::Init(), ExManagerMesh::Init(), ExManagerFont::Init(), ExManagerMap::Init(), ExManagerCamera::Init(), ExManagerGizmo::Init(), ExManagerParticuleSystem::Init(), ExManagerLight::Init(), ExManagerModel::Init(), ExManagerObjectWindow::Init(), ExManagerOutput::Init(), ExManagerCommand::Init(), ExManagerConsole::Init(), ExManagerNetwork::Init(), ExManagerFog::Init(), ExManagerAnimation::Init(), ExManagerEntity::Init(), ExManagerLoad::Init(), ExManagerPVS::Init(), m_FullScreen, ManagerAnimation, ManagerCamera, ManagerCommand, ManagerConsole, ManagerEntity, ManagerFog, ManagerFont, ManagerGizmo, ManagerId, ManagerInputGLUT, ManagerInterface, ManagerLight, ManagerLoad, ManagerMap, ManagerMesh, ManagerModele, ManagerNetwork, ManagerObjectWindow, ManagerOutPut, ManagerParticuleSystem, ManagerPVS, ManagerSound, ManagerSpirit, ManagerTexture, ManagerVertexArrays, ManagerVertexProgram, ManagerWindow, PreInitManager(), SetGlutCallBack(), et UnGuard. Référencé par main(), et PreInitManager().
00318 {
00319 Guard(void PreInitManager(void))
00320 //-------------------------------------------------------------------------------
00321 //Try to init all manager. When a manager fail in his init he return a exception
00322 //-------------------------------------------------------------------------------
00323 try{
00324 ManagerInputGLUT->Init();
00325 ManagerInputGLUT->CheckInput();
00326 ManagerInputGLUT->DisplayAviableInput();
00327 }catch(...){std::cout<<"Unknow error in ManagerInputGLUT Init "<<std::endl;}
00328 try{ManagerId->Init();}
00329 catch(...){std::cout<<"Unknow error in ManagerId Init "<<std::endl;}
00330 try{ManagerVertexArrays->Init();}
00331 catch(...){std::cout<<"Unknow error in ManagerVertexArrays Init "<<std::endl;}
00332 try{ManagerVertexProgram->Init();}
00333 catch(...){std::cout<<"Unknow error in ManagerVertexProgram Init "<<std::endl;}
00334 try{ManagerTexture->Init();}
00335 catch (ExCExpMultitexturing)
00336 {
00337 std::cout<<"GL_ARB_multitexture is missing unable to launch engine"<<std::endl;
00338 }
00339 catch(...){std::cout<<"Unknow error in ManagerTexture Init "<<std::endl;}
00340 try{
00341 ManagerSound->Init();
00342 ManagerSound->DisplayAviableInput();}
00343 catch(...){std::cout<<"Unknow error in ManagerSound Init "<<std::endl;}
00344 //---------------------
00345 try{ManagerInterface->Init();}
00346 catch(...){std::cout<<"Unknow error in ManagerInterface Init "<<std::endl;}
00347 try{ManagerSpirit->Init();}
00348 catch(...){std::cout<<"Unknow error in ManagerSpirit Init "<<std::endl;}
00349 try{ManagerMesh->Init();}
00350 catch(...){std::cout<<"Unknow error in ManagerMesh Init "<<std::endl;}
00351 try{ManagerFont->Init();}
00352 catch(...){std::cout<<"Unknow error in ManagerFont Init "<<std::endl;}
00353 try{ManagerMap->Init();}
00354 catch(...){std::cout<<"Unknow error in ManagerMap Init "<<std::endl;}
00355 try{ManagerCamera->Init();}
00356 catch(...){std::cout<<"Unknow error in ManagerCamera Init "<<std::endl;}
00357 try{ManagerGizmo->Init();}
00358 catch(...){std::cout<<"Unknow error in ManagerGizmo Init "<<std::endl;}
00359 try{ManagerParticuleSystem->Init();}
00360 catch(...){std::cout<<"Unknow error in ManagerParticuleSystem Init "<<std::endl;}
00361 try{ManagerLight->Init();}
00362 catch(...){std::cout<<"Unknow error in ManagerLight Init "<<std::endl;}
00363 //---------------------
00364 try{ManagerWindow->GlutCallBack=&SetGlutCallBack;
00365 if(m_FullScreen)ManagerWindow->Apply();}
00366 catch(...){std::cout<<"Unknow error in ManagerWindow Init "<<std::endl;}
00367 try{ManagerModele->Init();}
00368 catch(...){std::cout<<"Unknow error in ManagerModele Init "<<std::endl;}
00369 try{ManagerObjectWindow->Init();}
00370 catch(...){std::cout<<"Unknow error in ManagerObjectWindow Init "<<std::endl;}
00371 try{ManagerOutPut->Init();}
00372 catch(...){std::cout<<"Unknow error in ManagerOutPut Init "<<std::endl;}
00373 try{ManagerCommand->Init();}
00374 catch(...){std::cout<<"Unknow error in ManagerCommand Init "<<std::endl;}
00375 try{ManagerConsole->Init();}
00376 catch(...){std::cout<<"Unknow error in ManagerConsole Init "<<std::endl;}
00377 try{ManagerNetwork->Init();}
00378 catch(...){std::cout<<"Unknow error in ManagerNetwork Init "<<std::endl;}
00379 try{ManagerFog->Init();}
00380 catch(...){std::cout<<"Unknow error in ManagerFog Init "<<std::endl;}
00381 try{ManagerAnimation->Init();}
00382 catch(...){std::cout<<"Unknow error in ManagerAnimation Init "<<std::endl;}
00383 try{ManagerEntity->Init();}
00384 catch(...){std::cout<<"Unknow error in ManagerEntity Init "<<std::endl;}
00385 try{ManagerLoad->Init();}
00386 catch(...){std::cout<<"Unknow error in ManagerLoad Init "<<std::endl;}
00387 try{ManagerPVS->Init();}
00388 catch(...){std::cout<<"Unknow error in ManagerPVS Init "<<std::endl;}
00389 UnGuard
00390 }
|
|
||||||||||||
|
Définition à la ligne 497 du fichier Main.cpp. Références ManagerOutPut, et ExManagerOutput::Reshape(). Référencé par SetGlutCallBack().
00497 {ManagerOutPut->Reshape(w,h);}
|
|
|
Définition à la ligne 403 du fichier Main.cpp. Références display(), Focus(), Guard, ExManagerInputGLUT::IsJoystick(), ExManagerInputGLUT::IsKeyboard(), ExManagerInputGLUT::IsMouse(), ExManagerInputGLUT::IsSpaceBall(), ExManagerInputGLUT::IsTablet(), keyboard(), keyboardup(), ManagerInputGLUT, MotionFunc(), Mouse(), PassiveMotionFunc(), reshape(), SetGlutCallBack(), SpaceballMotionFunc(), SpaceballRotateFunc(), spekeyboard(), spekeyboardup(), TabletButtonFunc(), TabletMotionFunc(), et UnGuard. Référencé par main(), PreInitManager(), et SetGlutCallBack().
00404 {
00405 Guard(SetGlutCallBack(void))
00406 //------------------------------------------------
00407 //Adresse of Callbacks Keyboard
00408 //------------------------------------------------
00409 if(ManagerInputGLUT->IsKeyboard())
00410 {
00411 glutKeyboardFunc(keyboard);
00412 glutKeyboardUpFunc(keyboardup);
00413 glutSpecialFunc(spekeyboard);
00414 glutSpecialUpFunc(spekeyboardup);
00415 }else
00416 {
00417 glutKeyboardFunc(NULL);
00418 glutKeyboardUpFunc(NULL);
00419 glutSpecialFunc(NULL);
00420 glutSpecialUpFunc(NULL);
00421 }
00422 //------------------------------------------------
00423 //Adresse of Callbacks Mouse
00424 //------------------------------------------------
00425 if(ManagerInputGLUT->IsMouse())
00426 {
00427 glutMouseFunc(Mouse);
00428 glutEntryFunc(Focus);
00429 glutMotionFunc(MotionFunc);
00430 glutPassiveMotionFunc(PassiveMotionFunc);
00431 }
00432 else
00433 {
00434 glutMouseFunc(NULL);
00435 glutEntryFunc(NULL);
00436 glutMotionFunc(NULL);
00437 glutPassiveMotionFunc(NULL);
00438 }
00439 //------------------------------------------------
00440 //Adresse of Callbacks Joystick
00441 //------------------------------------------------
00442 if(ManagerInputGLUT->IsJoystick())
00443 {
00444 }
00445 else
00446 {
00447 }
00448 //------------------------------------------------
00449 //Adresse of Callbacks SpaceBall
00450 //------------------------------------------------
00451 if(ManagerInputGLUT->IsSpaceBall())
00452 {
00453 glutSpaceballMotionFunc(SpaceballMotionFunc);
00454 glutSpaceballRotateFunc(SpaceballRotateFunc);
00455 }
00456 else
00457 {
00458 glutSpaceballRotateFunc(NULL);
00459 glutSpaceballMotionFunc(NULL);
00460 }
00461 //------------------------------------------------
00462 //Adresse of Callbacks Tablet
00463 //------------------------------------------------
00464 if(ManagerInputGLUT->IsTablet())
00465 {
00466 glutTabletMotionFunc(TabletMotionFunc);
00467 glutTabletButtonFunc(TabletButtonFunc);
00468 }
00469 else
00470 {
00471 glutTabletMotionFunc(NULL);
00472 glutTabletButtonFunc(NULL);
00473 }
00474 //------------------------------------------------
00475 //Adresse of Callbacks render
00476 //------------------------------------------------
00477 glutDisplayFunc(display);
00478 glutIdleFunc(display);
00479 glutReshapeFunc(reshape);
00480
00481 UnGuard
00482 }
|
|
|
||||||||||||||||
|
Définition à la ligne 492 du fichier Main.cpp. Références ManagerInputGLUT, et ExManagerInputGLUT::SpaceballMotion(). Référencé par SetGlutCallBack().
00492 {ManagerInputGLUT->SpaceballMotion(x,y,z);}
|
|
||||||||||||||||
|
Définition à la ligne 493 du fichier Main.cpp. Références ManagerInputGLUT, et ExManagerInputGLUT::SpaceballRotate(). Référencé par SetGlutCallBack().
00493 {ManagerInputGLUT->SpaceballRotate(x,y,z);}
|
|
||||||||||||||||
|
Définition à la ligne 486 du fichier Main.cpp. Références ExManagerInputGLUT::KeySpe(), et ManagerInputGLUT. Référencé par SetGlutCallBack().
00486 {ManagerInputGLUT->KeySpe(key,x,y);}
|
|
||||||||||||||||
|
Définition à la ligne 487 du fichier Main.cpp. Références ExManagerInputGLUT::KeySpeUp(), et ManagerInputGLUT. Référencé par SetGlutCallBack().
00487 {ManagerInputGLUT->KeySpeUp(key,x,y);}
|
|
||||||||||||||||||||
|
Définition à la ligne 495 du fichier Main.cpp. Références ManagerInputGLUT, et ExManagerInputGLUT::TabletButton(). Référencé par SetGlutCallBack().
00495 {ManagerInputGLUT->TabletButton(button,state,x,y);}
|
|
||||||||||||
|
Définition à la ligne 494 du fichier Main.cpp. Références ManagerInputGLUT, et ExManagerInputGLUT::TabletMotion(). Référencé par SetGlutCallBack().
00494 {ManagerInputGLUT->TabletMotion(x,y);}
|
|
|
|
1.3.4