Page principale   Liste des namespaces   Hiérarchie des classes   Liste par ordre alphabétique   Liste des composants   Liste des fichiers   Composants   Déclarations  

Référence de la classe ExManagerWindow

#include <ExManagerWindow.h>


Membres publics

 ExManagerWindow (void)
 ~ExManagerWindow (void)
void SetManagerId (ExManagerId *Id)
void Create (int SizeX, int SizeY, int PosX, int PosY, char *argv)
void Create (int SizeX, int SizeY, char *argv)
void Move (int Posx, int Posy)
void SetResolution (int SizeX, int SizeY)
void SetRate (int Rate)
void SetBits (int Bits)
void SetFullScreen (bool State)
void SetWindowTitle (char *Title)
void SetIconTitle (char *Title)
void SetCursor (int Cursor)
void Apply (void)
int GetResolutionX (void)
int GetResolutionY (void)
int GetRate (void)
int GetBits (void)
bool GetFullScreen (void)
void SetFpsState (bool state)
void SetGrilleState (bool state)
void SetNetstatState (bool state)
void SetAntialliasingState (bool state)
void SetMenuState (bool state)
void SetConsoleState (bool state)
void SetInterfaceState (bool state)
void SetMotionBlurState (bool state)
bool GetFpsState (void)
bool GetGrilleState (void)
bool GetNetstatState (void)
bool GetAntialliasingState (void)
bool GetMenuState (void)
bool GetConsoleState (void)
bool GetInterfaceState (void)
bool GetMotionBlurState (void)
void EnterOrthoMode (int left, int top, int right, int bottom)
void LeaveOrthoMode (void)
void ShowFps (void)
void ShowNetStat (void)
void MotionBlur (void)
void CapturForMotionBlur (void)
void Specialeffect (void)
void Reset (void)
void SetSpecialEffect (int effect)

Attributs Publics

void(* GlutCallBack )()
std::ostrstream * Consol
void(* WriteToConsol )(const char *Label)

Attributs Privés

ExManagerIdManagerId
ExCOptionsoptions
int m_WindowHandler
int m_WindowSizeX
int m_WindowSizeY
int m_WindowSizeXOld
int m_WindowSizeYOld
int m_WindowPosX
int m_WindowPosY
int m_Bits
int m_Rate
bool m_FullScreen
bool m_OldMode
char * m_Title
char * m_IconTitle
int m_Cursor
bool m_ShowFps
bool m_ShowGrille
bool m_ShowNetStat
bool m_Antialliasing
bool m_Menu
bool m_Console
bool m_Interface
bool m_MotionBlur
bool m_MotionBlurTexture
uint TextureMotionBlur
int frame
int timeframe
int timebase
char s [30]
int m_effect
float m_CouterEffect


Documentation des contructeurs et destructeurs

ExManagerWindow void   
 

Définition à la ligne 26 du fichier ExManagerWindow.cpp.

Références ExManagerWindow(), ExCOptions::getWindowDepth(), ExCOptions::getWindowFullscreen(), ExCOptions::getWindowRate(), ExCOptions::getWindowResolutionX(), ExCOptions::getWindowResolutionY(), ExCOptions::getWindowShowfps(), Guard, m_Antialliasing, m_Bits, m_Console, m_CouterEffect, m_Cursor, m_FullScreen, m_IconTitle, m_Interface, m_Menu, m_MotionBlurTexture, m_OldMode, m_Rate, m_ShowFps, m_ShowGrille, m_ShowNetStat, m_Title, m_WindowPosX, m_WindowPosY, m_WindowSizeX, m_WindowSizeXOld, m_WindowSizeY, m_WindowSizeYOld, options, SetAntialliasingState(), UnGuard, et VERSION.

Référencé par ExManagerWindow(), et ~ExManagerWindow().

00026                                     {
00027 Guard(ExManagerWindow::ExManagerWindow(void))
00028         m_ShowGrille=false;
00029         m_ShowNetStat=false;
00030         m_Antialliasing=true;
00031         m_Menu=false;
00032         m_Console=false;
00033         m_Interface=false;
00034         
00035         options = new ExCOptions;
00036         
00037         m_ShowFps = options->getWindowShowfps ();
00038         
00039         m_WindowSizeX = options->getWindowResolutionX ();
00040         m_WindowSizeY = options->getWindowResolutionY ();
00041         m_WindowSizeXOld = m_WindowSizeX;
00042         m_WindowSizeYOld = m_WindowSizeY;
00043         m_WindowPosX=0;
00044         m_WindowPosY=0;
00045         m_Bits = options->getWindowDepth ();
00046         m_Rate = options->getWindowRate ();
00047         m_FullScreen = options->getWindowFullscreen () ;
00048         m_OldMode=m_FullScreen;
00049         m_Cursor=GLUT_CURSOR_CROSSHAIR;
00050         m_Title=new char[strlen("ExNihilo Engine Version ")+20];
00051         sprintf(m_Title,"ExNihilo Engine Version %s",VERSION);
00052         m_IconTitle=new char[strlen("ExNihilo Engine Version ")+20];
00053         sprintf(m_IconTitle,"ExNihilo %s",VERSION);
00054         SetAntialliasingState(true);
00055         m_MotionBlurTexture=false;
00056         m_CouterEffect=0.0f;
00057 UnGuard
00058 }

~ExManagerWindow void   
 

Définition à la ligne 60 du fichier ExManagerWindow.cpp.

Références ExManagerWindow(), Guard, et UnGuard.

00061 {
00062 Guard(ExManagerWindow::~ExManagerWindow(void))
00063 
00064 UnGuard
00065 }


Documentation des méthodes

void Apply void   
 

Définition à la ligne 138 du fichier ExManagerWindow.cpp.

Références Apply(), ExCOptions::getWindowFullscreen(), GlutCallBack, Guard, m_Antialliasing, m_Bits, m_Rate, m_Title, m_WindowHandler, m_WindowPosX, m_WindowPosY, m_WindowSizeX, m_WindowSizeY, options, SetAntialliasingState(), et UnGuard.

Référencé par Apply(), et ExManagerCommand::ProcessAction().

00138                                {
00139 Guard(ExManagerWindow::Apply(void))
00140         if(options->getWindowFullscreen ())
00141         {
00142                 if(m_OldMode)
00143                 {
00144                         glutDestroyWindow(m_WindowHandler);
00145                 }
00146                 char *game;
00147                 game=new char[15];
00148                 sprintf(game,"%dx%d:%d@%d",m_WindowSizeX,m_WindowSizeY,m_Bits,m_Rate);
00149                 glutGameModeString(game);
00150 #ifndef UNIX_SRC
00151                 if (glutGameModeGet(GLUT_GAME_MODE_POSSIBLE)) {
00152 #else
00153                 if (glutGameModeGet(GLUT_GAME_MODE_WIDTH)) {
00154 #endif
00155                         m_WindowHandler=glutEnterGameMode();
00156                         GlutCallBack();
00157                         glutSetWindow(m_WindowHandler);
00158 
00159                 } else {
00160                         std::cout << "can not switch to fullscreen" << std::endl;
00161                 }
00162         }else
00163         {
00164                 if(m_OldMode)
00165                 {
00166                         glutLeaveGameMode();
00167                         glutInitWindowPosition(m_WindowPosX,m_WindowPosY);
00168                         glutInitWindowSize(m_WindowSizeX,m_WindowSizeY);                
00169                         m_WindowHandler=glutCreateWindow(m_Title);
00170                 }else
00171                 {
00172                         glutReshapeWindow(m_WindowSizeX,m_WindowSizeY);
00173                 }
00174         }
00175         SetAntialliasingState(m_Antialliasing);
00176 UnGuard
00177 }

void CapturForMotionBlur void   
 

Définition à la ligne 317 du fichier ExManagerWindow.cpp.

Références CapturForMotionBlur(), Guard, TextureMotionBlur, et UnGuard.

Référencé par CapturForMotionBlur().

00318 {
00319 Guard(void ExManagerWindow::CapturForMotionBlur(void))
00320         glBindTexture(GL_TEXTURE_2D,TextureMotionBlur);
00321         glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 512, 512, 0);
00322 UnGuard
00323 }

void Create int    SizeX,
int    SizeY,
char *    argv
 

Définition à la ligne 83 du fichier ExManagerWindow.cpp.

Références Create(), Guard, m_Cursor, m_IconTitle, m_Title, m_WindowHandler, m_WindowPosX, m_WindowPosY, m_WindowSizeX, m_WindowSizeXOld, m_WindowSizeY, m_WindowSizeYOld, SetCursor(), et UnGuard.

00083                                                           {
00084 Guard(ExManagerWindow::Create(int SizeX,int SizeY,char *argv))
00085         m_WindowSizeX=SizeX;
00086         m_WindowSizeY=SizeY;
00087         m_WindowSizeXOld=SizeX;
00088         m_WindowSizeYOld=SizeY;
00089         glutInitWindowPosition(m_WindowPosX,m_WindowPosY);
00090         glutInitWindowSize(m_WindowSizeX,m_WindowSizeY);                
00091         m_WindowHandler=glutCreateWindow(m_Title);
00092         glutSetIconTitle(m_IconTitle);
00093         SetCursor(m_Cursor);
00094 UnGuard
00095 }

void Create int    SizeX,
int    SizeY,
int    PosX,
int    PosY,
char *    argv
 

Définition à la ligne 67 du fichier ExManagerWindow.cpp.

Références Create(), Guard, m_Cursor, m_IconTitle, m_Title, m_WindowHandler, m_WindowPosX, m_WindowPosY, m_WindowSizeX, m_WindowSizeXOld, m_WindowSizeY, m_WindowSizeYOld, SetCursor(), et UnGuard.

Référencé par Create(), et main().

00067                                                                             {
00068 Guard(ExManagerWindow::Create(int SizeX,int SizeY,int PosX,int PosY,char *argv))
00069         m_WindowSizeX=SizeX;
00070         m_WindowSizeY=SizeY;
00071         m_WindowSizeXOld=SizeX;
00072         m_WindowSizeYOld=SizeY;
00073         m_WindowPosX=PosX;
00074         m_WindowPosY=PosY;
00075         glutInitWindowPosition(m_WindowPosX,m_WindowPosY);
00076         glutInitWindowSize(m_WindowSizeX,m_WindowSizeY);                
00077         m_WindowHandler=glutCreateWindow(m_Title);
00078         glutSetIconTitle(m_IconTitle);
00079         SetCursor(m_Cursor);
00080 UnGuard
00081 }

void EnterOrthoMode int    left,
int    top,
int    right,
int    bottom
 

Définition à la ligne 332 du fichier ExManagerWindow.cpp.

Référencé par ExManagerConsole::DrawConsole(), ExCInterface::DrawInterface(), MotionBlur(), et Specialeffect().

00333 {
00334         glMatrixMode(GL_PROJECTION);                                            
00335         glPushMatrix();                                                                 
00336         glLoadIdentity();                                                               
00337         glOrtho( left, right, bottom, top, 0, 1 );      
00338         glMatrixMode(GL_MODELVIEW);                                                             
00339         glLoadIdentity();                                                                               
00340 }

bool GetAntialliasingState void    [inline]
 

Définition à la ligne 129 du fichier ExManagerWindow.h.

Références m_Antialliasing.

00129 {return m_Antialliasing;}

int GetBits void    [inline]
 

Définition à la ligne 113 du fichier ExManagerWindow.h.

Références m_Bits.

00113 {return m_Bits;}

bool GetConsoleState void    [inline]
 

Définition à la ligne 131 du fichier ExManagerWindow.h.

Références m_Console.

Référencé par ExManagerOutput::DrawScene(), et ExManagerCommand::InputCommand().

00131 {return m_Console;}

bool GetFpsState void    [inline]
 

Définition à la ligne 126 du fichier ExManagerWindow.h.

Références m_ShowFps.

Référencé par ExManagerOutput::DrawScene().

00126 {return m_ShowFps;}

bool GetFullScreen void    [inline]
 

Définition à la ligne 114 du fichier ExManagerWindow.h.

Références m_FullScreen.

00114 {return m_FullScreen;}

bool GetGrilleState void    [inline]
 

Définition à la ligne 127 du fichier ExManagerWindow.h.

Références m_ShowGrille.

Référencé par ExManagerOutput::DrawScene(), et ExManagerCommand::ProcessAction().

00127 {return m_ShowGrille;}

bool GetInterfaceState void    [inline]
 

Définition à la ligne 132 du fichier ExManagerWindow.h.

Références m_Interface.

Référencé par ExManagerOutput::DrawScene(), et ExManagerCommand::InputCommand().

00132 {return m_Interface;}

bool GetMenuState void    [inline]
 

Définition à la ligne 130 du fichier ExManagerWindow.h.

Références m_Menu.

Référencé par ExManagerCommand::InputCommand().

00130 {return m_Menu;}

bool GetMotionBlurState void    [inline]
 

Définition à la ligne 133 du fichier ExManagerWindow.h.

Références m_MotionBlur.

Référencé par ExManagerOutput::DrawScene().

00133 {return m_MotionBlur;}

bool GetNetstatState void    [inline]
 

Définition à la ligne 128 du fichier ExManagerWindow.h.

Références m_ShowNetStat.

Référencé par ExManagerOutput::DrawScene().

00128 {return m_ShowNetStat;}

int GetRate void    [inline]
 

Définition à la ligne 112 du fichier ExManagerWindow.h.

Références m_Rate.

00112 {return m_Rate;}

int GetResolutionX void    [inline]
 

Définition à la ligne 110 du fichier ExManagerWindow.h.

Références m_WindowSizeX.

Référencé par ExManagerConsole::DrawConsole(), ExCInterface::DrawInterface(), ExManagerOutput::DrawScene(), ExCInterface::InputCommand(), ExManagerOutput::Reshape(), et ShowFps().

00110 {return m_WindowSizeX;}

int GetResolutionY void    [inline]
 

Définition à la ligne 111 du fichier ExManagerWindow.h.

Références m_WindowSizeY.

Référencé par ExManagerConsole::DrawConsole(), ExCInterface::DrawInterface(), ExManagerOutput::DrawScene(), ExCInterface::InputCommand(), ExManagerOutput::Reshape(), et ShowFps().

00111 {return m_WindowSizeY;}

void LeaveOrthoMode void   
 

Définition à la ligne 342 du fichier ExManagerWindow.cpp.

Référencé par ExManagerConsole::DrawConsole(), ExCInterface::DrawInterface(), MotionBlur(), et Specialeffect().

00343 {
00344         glMatrixMode( GL_PROJECTION );                                                  
00345         glPopMatrix();                                                                                  
00346         glMatrixMode( GL_MODELVIEW );                                                   
00347 }

void MotionBlur void   
 

Définition à la ligne 235 du fichier ExManagerWindow.cpp.

Références EnterOrthoMode(), Guard, LeaveOrthoMode(), m_MotionBlurTexture, m_WindowSizeX, m_WindowSizeY, MotionBlur(), TextureMotionBlur, et UnGuard.

Référencé par ExManagerOutput::DrawScene(), et MotionBlur().

00236 {
00237 Guard(void ExManagerWindow::MotionBlur(void))
00238         if(!m_MotionBlurTexture)
00239         {
00240                 // Create a pointer to store the blank image data
00241                 unsigned int *pTexture = NULL;                                                                                  
00242 
00243                 // Allocate and init memory for the image array and point to it from pTexture
00244                 pTexture = new unsigned int [512 * 512 * 3];
00245                 memset(pTexture, 0, 512 * 512 * 3 * sizeof(unsigned int));      
00246 
00247                 // Register the texture with OpenGL and bind it to the texture ID
00248                 glGenTextures(1, &TextureMotionBlur);                                                           
00249                 glBindTexture(GL_TEXTURE_2D, TextureMotionBlur);                                        
00250                 
00251                 // Create the texture and store it on the video card
00252                 glTexImage2D(GL_TEXTURE_2D, 0, 3, 512, 512, 0, GL_RGB, GL_UNSIGNED_INT, pTexture);                                              
00253                 
00254                 // Set the texture quality
00255                 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
00256                 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
00257 
00258                 // Since we stored the texture space with OpenGL, we can delete the image data
00259                 delete [] pTexture;                                                     
00260                 m_MotionBlurTexture=true;
00261         }
00262 
00263         // Push on a new stack so that we do not interfere with the current matrix
00264         glPushMatrix();
00265 
00266                 // Turn off depth testing so that we can blend over the screen
00267                 glDisable(GL_DEPTH_TEST);                       
00268 
00269                 // Set our blend method and enable blending
00270                 //glBlendFunc(GL_SRC_ALPHA,GL_ONE);     
00271                 //glEnable(GL_BLEND);                                   
00272 
00273                 
00274                 // Decrease the alpha value of the blend by %10 so it will fade nicely
00275                 glColor4f(1, 1, 1, 0.9f);
00276 
00277                 // Switch to 2D mode (Ortho mode)
00278                 EnterOrthoMode(0, 0, m_WindowSizeX, m_WindowSizeY);
00279 
00280                 // Display a 2D quad with our blended texture
00281                 glEnable(GL_TEXTURE_2D);
00282                 glBindTexture(GL_TEXTURE_2D,TextureMotionBlur);
00283                 glBegin(GL_QUADS);
00284 
00285 
00286                         // Display the top left point of the 2D image
00287                         glTexCoord2f(0.0f, 1.0f);       glVertex2f(0, 0);
00288 
00289                         // Display the bottom left point of the 2D image
00290                         //glTexCoord2f(0.0f, 0.0f);     glVertex2f(0, m_WindowSizeY);
00291                         glTexCoord2f(0.0f, 0.0f);       glVertex2f(0, 80);
00292 
00293                         // Display the bottom right point of the 2D image
00294                         //glTexCoord2f(1.0f, 0.0f);     glVertex2f(m_WindowSizeX, m_WindowSizeY);
00295                         glTexCoord2f(1.0f, 0.0f);       glVertex2f(80, 80);
00296 
00297                         // Display the top right point of the 2D image
00298                         //glTexCoord2f(1.0f, 1.0f);     glVertex2f(m_WindowSizeX, 0);
00299                         glTexCoord2f(1.0f, 1.0f);       glVertex2f(80, 0);
00300 
00301                 // Stop drawing 
00302                 glEnd();
00303                 glDisable(GL_TEXTURE_2D);
00304                 // Let's set our mode back to perspective 3D mode.
00305                 LeaveOrthoMode();
00306 
00307                 // Turn depth testing back on and texturing off.  If you do NOT do these 2 lines of 
00308                 // code it produces a cool flash effect that might come in handy somewhere down the road.
00309                 glEnable(GL_DEPTH_TEST);                                                
00310                 glDisable(GL_BLEND);                                                    
00311                 
00312         // Go back to our original matrix
00313         glPopMatrix();  
00314 UnGuard
00315 }

void Move int    Posx,
int    Posy
 

Définition à la ligne 97 du fichier ExManagerWindow.cpp.

Références Guard, m_WindowPosX, m_WindowPosY, Move(), et UnGuard.

Référencé par Move().

00097                                            {
00098 Guard(ExManagerWindow::Move(int Posx,int Posy))
00099         m_WindowPosX=Posx;
00100         m_WindowPosY=Posy;
00101         glutPositionWindow(Posx,Posy);
00102 UnGuard
00103 }

void Reset void   
 

void SetAntialliasingState bool    state
 

Définition à la ligne 179 du fichier ExManagerWindow.cpp.

Références Guard, m_Antialliasing, SetAntialliasingState(), et UnGuard.

Référencé par Apply(), ExManagerWindow(), ExManagerCommand::ProcessAction(), et SetAntialliasingState().

00180 {
00181 Guard(void ExManagerWindow::SetAntialliasingState(bool state))
00182         m_Antialliasing=state;
00183         if(m_Antialliasing)
00184         {
00185                 glEnable(GL_LINE_SMOOTH);
00186                 glEnable(GL_BLEND);
00187                 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00188                 glHint(GL_LINE_SMOOTH_HINT,GL_DONT_CARE);
00189         }else
00190         {
00191                 glDisable(GL_LINE_SMOOTH);
00192                 glDisable(GL_BLEND);
00193         }
00194 UnGuard
00195 }

void SetBits int    Bits [inline]
 

Définition à la ligne 103 du fichier ExManagerWindow.h.

Références m_Bits.

Référencé par ExManagerCommand::ProcessAction().

00103 {m_Bits=Bits;}

void SetConsoleState bool    state [inline]
 

Définition à la ligne 121 du fichier ExManagerWindow.h.

Références m_Console.

Référencé par ExManagerConsole::DrawConsole(), et ExManagerConsole::SetConsoleState().

00121 {m_Console=state;}

void SetCursor int    Cursor
 

Définition à la ligne 131 du fichier ExManagerWindow.cpp.

Références Guard, SetCursor(), et UnGuard.

Référencé par Create(), et SetCursor().

00131                                          {
00132 Guard(ExManagerWindow::SetCursor(int Cursor))
00133         glutSetCursor(Cursor);
00134 UnGuard
00135 }

void SetFpsState bool    state [inline]
 

Définition à la ligne 116 du fichier ExManagerWindow.h.

Références m_ShowFps.

Référencé par main(), et ExManagerCommand::ProcessAction().

00116 {m_ShowFps=state;}

void SetFullScreen bool    State [inline]
 

Définition à la ligne 104 du fichier ExManagerWindow.h.

Références m_FullScreen.

Référencé par ExManagerCommand::ProcessAction().

00104 {m_FullScreen=State;}

void SetGrilleState bool    state [inline]
 

Définition à la ligne 117 du fichier ExManagerWindow.h.

Références m_ShowGrille.

Référencé par ExManagerCommand::ProcessAction().

00117 {m_ShowGrille=state;}

void SetIconTitle char *    Title
 

Définition à la ligne 123 du fichier ExManagerWindow.cpp.

Références Guard, m_IconTitle, SetIconTitle(), et UnGuard.

Référencé par SetIconTitle().

00123                                              {
00124 Guard(ExManagerWindow::SetIconTitle(char *Title))
00125         m_IconTitle=new char[strlen(Title)];
00126         sprintf(m_IconTitle,"%s",Title);
00127         glutSetIconTitle(m_IconTitle);
00128 UnGuard
00129 }

void SetInterfaceState bool    state [inline]
 

Définition à la ligne 122 du fichier ExManagerWindow.h.

Références m_Interface.

Référencé par ExManagerCommand::ProcessAction().

00122 {m_Interface=state;}

void SetManagerId ExManagerId   Id [inline]
 

Définition à la ligne 96 du fichier ExManagerWindow.h.

Référencé par SetManagerLink().

00096 {ManagerId      = Id;}

void SetMenuState bool    state [inline]
 

Définition à la ligne 120 du fichier ExManagerWindow.h.

Références m_Menu.

00120 {m_Menu=state;}

void SetMotionBlurState bool    state [inline]
 

Définition à la ligne 123 du fichier ExManagerWindow.h.

Références m_MotionBlur.

00123 {m_MotionBlur=state;}

void SetNetstatState bool    state [inline]
 

Définition à la ligne 118 du fichier ExManagerWindow.h.

Références m_ShowNetStat.

Référencé par ExManagerCommand::ProcessAction().

00118 {m_ShowNetStat=state;}

void SetRate int    Rate [inline]
 

Définition à la ligne 102 du fichier ExManagerWindow.h.

Références m_Rate.

00102 {m_Rate=Rate;}

void SetResolution int    SizeX,
int    SizeY
 

Définition à la ligne 106 du fichier ExManagerWindow.cpp.

Références Guard, m_WindowSizeX, m_WindowSizeXOld, m_WindowSizeY, m_WindowSizeYOld, SetResolution(), et UnGuard.

Référencé par ExManagerCommand::ProcessAction(), ExManagerOutput::Reshape(), et SetResolution().

00106                                                       {
00107 Guard(ExManagerWindow::SetResolution(int SizeX,int SizeY))
00108         m_WindowSizeXOld=m_WindowSizeX;
00109         m_WindowSizeYOld=m_WindowSizeY; 
00110         m_WindowSizeX=SizeX;
00111         m_WindowSizeY=SizeY;
00112 UnGuard
00113 }

void SetSpecialEffect int    effect
 

Définition à la ligne 463 du fichier ExManagerWindow.cpp.

Références BLACK_TO_FADE, FADE_TO_BLACK, FADE_TO_WHITE, m_CouterEffect, m_effect, et WITHE_TO_FADE.

Référencé par ExManagerCommand::ProcessAction().

00464 {
00465         m_effect=effect;
00466         switch(m_effect)
00467         {
00468         case FADE_TO_WHITE:
00469                 m_CouterEffect=0;
00470                 break;
00471         case WITHE_TO_FADE:
00472                 m_CouterEffect=256;
00473                 break;
00474         case FADE_TO_BLACK:
00475                 m_CouterEffect=0;
00476                 break;
00477         case BLACK_TO_FADE:
00478                 m_CouterEffect=256;
00479                 break;
00480         }
00481 }

void SetWindowTitle char *    Title
 

Définition à la ligne 115 du fichier ExManagerWindow.cpp.

Références Guard, m_Title, SetWindowTitle(), et UnGuard.

Référencé par SetWindowTitle().

00115                                                {
00116 Guard(ExManagerWindow::SetWindowTitle(char *Title))
00117         m_Title = new char[strlen(Title)];
00118         sprintf(m_Title,"%s",Title);
00119         glutSetWindowTitle(m_Title);
00120 UnGuard
00121 }

void ShowFps void   
 

Définition à la ligne 197 du fichier ExManagerWindow.cpp.

Références frame, GetResolutionX(), GetResolutionY(), Guard, RenderBitmapString(), s, ShowFps(), timebase, timeframe, et UnGuard.

Référencé par ExManagerOutput::DrawScene(), et ShowFps().

00198 {
00199 Guard(void ExManagerWindow::ShowFps(void))
00200         glMatrixMode(GL_PROJECTION);
00201         glPushMatrix();
00202                 glLoadIdentity();
00203                 gluOrtho2D(0, GetResolutionX(), 0, GetResolutionY());
00204                 glScalef(1, -1, 1);
00205                 glTranslatef(0, -GetResolutionY(),0);
00206                 glMatrixMode(GL_MODELVIEW);
00207                 glDisable(GL_LIGHTING);
00208                 glPushMatrix();
00209                         glLoadIdentity();
00210                         glColor3f(1.0,1.0,1.0);
00211 
00212                         frame++;
00213                         timeframe=glutGet(GLUT_ELAPSED_TIME);
00214                         if (timeframe - timebase > 1000) 
00215                         {
00216                                 sprintf(s,"FPS:%4.2f",frame*1000.0/(timeframe-timebase));
00217                                 timebase = timeframe;           
00218                                 frame = 0;
00219                         }
00220 
00221                         RenderBitmapString(30,15,(void *)GLUT_BITMAP_HELVETICA_12,"ExNihilo");
00222                         RenderBitmapString(30,35,(void *)GLUT_BITMAP_HELVETICA_12,s);
00223                         char TimeSinceStart[30];
00224                         sprintf(TimeSinceStart,"Time since start:%f"
00225                                 ,(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000));
00226                         RenderBitmapString(30,55,(void *)GLUT_BITMAP_HELVETICA_12,TimeSinceStart);
00227 
00228                 glPopMatrix();
00229         glMatrixMode(GL_PROJECTION);
00230         glPopMatrix();
00231         glMatrixMode(GL_MODELVIEW);
00232 UnGuard
00233 }

void ShowNetStat void   
 

Définition à la ligne 326 du fichier ExManagerWindow.cpp.

Références Guard, ShowNetStat(), et UnGuard.

Référencé par ExManagerOutput::DrawScene(), et ShowNetStat().

00327 {
00328 Guard(void ExManagerWindow::ShowNetStat(void))
00329 UnGuard
00330 }

void Specialeffect void   
 

Définition à la ligne 349 du fichier ExManagerWindow.cpp.

Références BLACK_TO_FADE, EnterOrthoMode(), FADE_TO_BLACK, FADE_TO_WHITE, LeaveOrthoMode(), m_CouterEffect, m_effect, m_WindowSizeX, m_WindowSizeY, uchar, et WITHE_TO_FADE.

Référencé par ExManagerOutput::DrawScene().

00350 {
00351         switch(m_effect)
00352         {
00353         case FADE_TO_WHITE:             
00354                 glColor4ub(255,255,255, (uchar)m_CouterEffect);
00355                 EnterOrthoMode(0, 0, m_WindowSizeX, m_WindowSizeY);
00356                 
00357                 glEnable(GL_BLEND);     
00358                 glDisable(GL_DEPTH_TEST);
00359                 glBlendFunc(GL_SRC_ALPHA,GL_ONE);
00360                 
00361                 glBegin(GL_QUADS);
00362                         glVertex2f(0, 0);
00363                         glVertex2f(0, m_WindowSizeY);
00364                         glVertex2f(m_WindowSizeX, m_WindowSizeY);
00365                         glVertex2f(m_WindowSizeX, 0);
00366                 glEnd();
00367                         
00368                 glDisable(GL_BLEND);            
00369                 glEnable(GL_DEPTH_TEST);
00370 
00371                 LeaveOrthoMode();
00372                 m_CouterEffect++;
00373                                 
00374                 if(m_CouterEffect>255)
00375                 {
00376                         m_CouterEffect=0;
00377                         m_effect=0;
00378                 }
00379                 break;
00380         case WITHE_TO_FADE:
00381                 glColor4ub(255,255,255, m_CouterEffect);
00382                 EnterOrthoMode(0, 0, m_WindowSizeX, m_WindowSizeY);
00383                 
00384                 glEnable(GL_BLEND);     
00385                 glDisable(GL_DEPTH_TEST);
00386                 glBlendFunc(GL_SRC_ALPHA,GL_ONE);
00387                 
00388                 glBegin(GL_QUADS);
00389                         glVertex2f(0, 0);
00390                         glVertex2f(0, m_WindowSizeY);
00391                         glVertex2f(m_WindowSizeX, m_WindowSizeY);
00392                         glVertex2f(m_WindowSizeX, 0);
00393                 glEnd();
00394                         
00395                 glDisable(GL_BLEND);            
00396                 glEnable(GL_DEPTH_TEST);
00397 
00398                 LeaveOrthoMode();
00399                 m_CouterEffect--;
00400                                 
00401                 if(m_CouterEffect<1)
00402                 {
00403                         m_CouterEffect=255;
00404                         m_effect=0;
00405                 }
00406                 break;
00407         case FADE_TO_BLACK:
00408                 glColor4ub(0,0,0, m_CouterEffect);
00409                 EnterOrthoMode(0, 0, m_WindowSizeX, m_WindowSizeY);
00410                 
00411                 glEnable(GL_BLEND);     
00412                 glDisable(GL_DEPTH_TEST);
00413                 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00414                 
00415                 glBegin(GL_QUADS);
00416                         glVertex2f(0, 0);
00417                         glVertex2f(0, m_WindowSizeY);
00418                         glVertex2f(m_WindowSizeX, m_WindowSizeY);
00419                         glVertex2f(m_WindowSizeX, 0);
00420                 glEnd();
00421                         
00422                 glDisable(GL_BLEND);            
00423                 glEnable(GL_DEPTH_TEST);
00424 
00425                 LeaveOrthoMode();
00426                 m_CouterEffect++;
00427                                 
00428                 if(m_CouterEffect>255)
00429                 {
00430                         m_CouterEffect=0;
00431                         m_effect=0;
00432                 }
00433                 break;
00434         case BLACK_TO_FADE:
00435                 glColor4ub(0,0,0, m_CouterEffect);
00436                 EnterOrthoMode(0, 0, m_WindowSizeX, m_WindowSizeY);
00437                 
00438                 glEnable(GL_BLEND);     
00439                 glDisable(GL_DEPTH_TEST);
00440                 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00441                 
00442                 glBegin(GL_QUADS);
00443                         glVertex2f(0, 0);
00444                         glVertex2f(0, m_WindowSizeY);
00445                         glVertex2f(m_WindowSizeX, m_WindowSizeY);
00446                         glVertex2f(m_WindowSizeX, 0);
00447                 glEnd();
00448                         
00449                 glDisable(GL_BLEND);            
00450                 glEnable(GL_DEPTH_TEST);
00451 
00452                 LeaveOrthoMode();
00453                 m_CouterEffect--;
00454                                 
00455                 if(m_CouterEffect<1)
00456                 {
00457                         m_CouterEffect=255;
00458                         m_effect=0;
00459                 }
00460                 break;
00461         }
00462 }


Documentation des données imbriquées

std::ostrstream* Consol
 

Définition à la ligne 93 du fichier ExManagerWindow.h.

Référencé par SetManagerLink().

int frame [private]
 

Définition à la ligne 77 du fichier ExManagerWindow.h.

Référencé par ShowFps().

void(* GlutCallBack)()
 

Référencé par Apply(), et InitManager().

bool m_Antialliasing [private]
 

Définition à la ligne 69 du fichier ExManagerWindow.h.

Référencé par Apply(), ExManagerWindow(), GetAntialliasingState(), et SetAntialliasingState().

int m_Bits [private]
 

Définition à la ligne 58 du fichier ExManagerWindow.h.

Référencé par Apply(), ExManagerWindow(), GetBits(), et SetBits().

bool m_Console [private]
 

Définition à la ligne 71 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), GetConsoleState(), et SetConsoleState().

float m_CouterEffect [private]
 

Définition à la ligne 81 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), SetSpecialEffect(), et Specialeffect().

int m_Cursor [private]
 

Définition à la ligne 64 du fichier ExManagerWindow.h.

Référencé par Create(), et ExManagerWindow().

int m_effect [private]
 

Définition à la ligne 80 du fichier ExManagerWindow.h.

Référencé par SetSpecialEffect(), et Specialeffect().

bool m_FullScreen [private]
 

Définition à la ligne 60 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), GetFullScreen(), et SetFullScreen().

char* m_IconTitle [private]
 

Définition à la ligne 63 du fichier ExManagerWindow.h.

Référencé par Create(), ExManagerWindow(), et SetIconTitle().

bool m_Interface [private]
 

Définition à la ligne 72 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), GetInterfaceState(), et SetInterfaceState().

bool m_Menu [private]
 

Définition à la ligne 70 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), GetMenuState(), et SetMenuState().

bool m_MotionBlur [private]
 

Définition à la ligne 73 du fichier ExManagerWindow.h.

Référencé par GetMotionBlurState(), et SetMotionBlurState().

bool m_MotionBlurTexture [private]
 

Définition à la ligne 74 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), et MotionBlur().

bool m_OldMode [private]
 

Définition à la ligne 61 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow().

int m_Rate [private]
 

Définition à la ligne 59 du fichier ExManagerWindow.h.

Référencé par Apply(), ExManagerWindow(), GetRate(), et SetRate().

bool m_ShowFps [private]
 

Définition à la ligne 66 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), GetFpsState(), et SetFpsState().

bool m_ShowGrille [private]
 

Définition à la ligne 67 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), GetGrilleState(), et SetGrilleState().

bool m_ShowNetStat [private]
 

Définition à la ligne 68 du fichier ExManagerWindow.h.

Référencé par ExManagerWindow(), GetNetstatState(), et SetNetstatState().

char* m_Title [private]
 

Définition à la ligne 62 du fichier ExManagerWindow.h.

Référencé par Apply(), Create(), ExManagerWindow(), et SetWindowTitle().

int m_WindowHandler [private]
 

Définition à la ligne 51 du fichier ExManagerWindow.h.

Référencé par Apply(), et Create().

int m_WindowPosX [private]
 

Définition à la ligne 56 du fichier ExManagerWindow.h.

Référencé par Apply(), Create(), ExManagerWindow(), et Move().

int m_WindowPosY [private]
 

Définition à la ligne 57 du fichier ExManagerWindow.h.

Référencé par Apply(), Create(), ExManagerWindow(), et Move().

int m_WindowSizeX [private]
 

Définition à la ligne 52 du fichier ExManagerWindow.h.

Référencé par Apply(), Create(), ExManagerWindow(), GetResolutionX(), MotionBlur(), SetResolution(), et Specialeffect().

int m_WindowSizeXOld [private]
 

Définition à la ligne 54 du fichier ExManagerWindow.h.

Référencé par Create(), ExManagerWindow(), et SetResolution().

int m_WindowSizeY [private]
 

Définition à la ligne 53 du fichier ExManagerWindow.h.

Référencé par Apply(), Create(), ExManagerWindow(), GetResolutionY(), MotionBlur(), SetResolution(), et Specialeffect().

int m_WindowSizeYOld [private]
 

Définition à la ligne 55 du fichier ExManagerWindow.h.

Référencé par Create(), ExManagerWindow(), et SetResolution().

ExManagerId* ManagerId [private]
 

Définition à la ligne 48 du fichier ExManagerWindow.h.

ExCOptions* options [private]
 

Définition à la ligne 49 du fichier ExManagerWindow.h.

Référencé par Apply(), et ExManagerWindow().

char s[30] [private]
 

Définition à la ligne 78 du fichier ExManagerWindow.h.

Référencé par ShowFps().

uint TextureMotionBlur [private]
 

Définition à la ligne 75 du fichier ExManagerWindow.h.

Référencé par CapturForMotionBlur(), et MotionBlur().

int timebase [private]
 

Définition à la ligne 77 du fichier ExManagerWindow.h.

Référencé par ShowFps().

int timeframe [private]
 

Définition à la ligne 77 du fichier ExManagerWindow.h.

Référencé par ShowFps().

void(* WriteToConsol)(const char *Label)
 

Référencé par SetManagerLink().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Aug 6 20:25:47 2002 pour ExNihilo par doxygen1.2.17