Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3361 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Jan 6, 2005, 10:25:29 PM (20 years ago)
Author:
patrick
Message:

orxonox/branches/parenting: did a little HUD on the screen. fancy but not realy serious…:) was just testing with my loadscreen

Location:
orxonox/branches/parenting/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/glmenu_imagescreen.cc

    r3359 r3361  
    4747void GLMenuImageScreen::init ()
    4848{
     49  /*
    4950  int w = 680;
    5051  int h = 480;
     
    6061  this->backTex->loadImage("orx_tex.bmp");
    6162
    62   /* ------------painten */
    63 
    6463  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    6564  glLoadIdentity();
     
    6867  // Bind the texture stored at the zero index of g_Texture[]
    6968  //glBindTexture(GL_TEXTURE_2D, g_Texture[0]);
     69  */
     70
     71  int e_bnd=0,b0=0,BANDS=64,j=0,k=0; // 0 = 32 band and 1 = 64 band.
     72  int red,green,blue,alpha=100;
     73 
     74  float vuX,vuY;
     75  long x;
     76  float gap=7.915f; // for default
     77  double equVal,y1=0;
     78  float AV_peak_falloff = 0.8f; // Spead the Peaks fall.
     79 
     80  int n;
     81 
     82  // Screen Size.
     83  int screen_width = 640;
     84  int screen_height = 480;
     85 
     86  // Set Image Size.
     87  int hud_width = 50;
     88  int hud_height = 50;
     89 
     90  // Start pos of image.
     91  int hud_x = 10;
     92  int hud_y = 10;
     93 
     94  glEnable(GL_BLEND);
     95  glEnable(GL_TEXTURE_2D);
     96 
     97  // Select Our VU Meter Background Texture
     98  this->backTex = new Texture();
     99  this->backTex->loadImage("orx_tex.bmp");
     100  glPushAttrib(GL_LIGHTING_BIT | GL_TRANSFORM_BIT);
     101 
     102  glDisable(GL_LIGHTING);
     103  glMatrixMode(GL_PROJECTION);
     104  glPushMatrix();
     105  glLoadIdentity();
     106  glOrtho(0,screen_width,0,screen_height,-1,1); // Set Up An Ortho Screen
     107  glMatrixMode(GL_MODELVIEW);
     108  glLoadIdentity();
     109  glPushMatrix();
     110  glEnable(GL_BLEND);
     111
     112  glBegin(GL_QUADS);
     113  glTexCoord2i(0, 0); glVertex2i(hud_x, hud_y);
     114  glTexCoord2i(1, 0 ); glVertex2i( hud_x+hud_width, hud_y );
     115  glTexCoord2i( 1, 1 ); glVertex2i( hud_x+hud_width, hud_y+hud_height );
     116  glTexCoord2i( 0, 1 ); glVertex2i( hud_x, hud_y+hud_height );
     117  glEnd();
     118
     119  glDisable(GL_BLEND);
     120  glPopMatrix();
     121  glMatrixMode(GL_PROJECTION);
     122  glPopMatrix();
     123  glPopAttrib();
     124  glDisable(GL_TEXTURE_2D);
     125  glDisable(GL_BLEND);
     126  // End of Background image code.
    70127}
    71128
     
    92149void GLMenuImageScreen::draw ()
    93150{
     151  /*
    94152  // Display a quad texture to the screen
    95153  glEnable(GL_TEXTURE_2D);
     
    114172  glEnd();
    115173  glEnable(GL_TEXTURE_2D); 
    116 
     174  */
     175 
    117176  SDL_GL_SwapBuffers();                   
    118177
    119178  delete this->backTex;
    120   SDL_Delay(1000);
     179  SDL_Delay(5000);
    121180}
    122181
  • orxonox/branches/parenting/src/world.cc

    r3360 r3361  
    131131}
    132132
     133
    133134ErrorMessage World::resume()
    134135{
     
    136137}
    137138
     139
    138140void World::destroy()
    139141{
    140 
    141142}
    142143
     
    146147  printf ("World::displayLoadScreen - start\n");
    147148 
    148   GLMenuImageScreen* glmis = new GLMenuImageScreen();
     149  //GLMenuImageScreen*
     150  glmis = new GLMenuImageScreen();
    149151  glmis->init();
    150152  glmis->draw();
     
    157159{
    158160  printf ("World::releaseLoadScreen - start\n");
    159 
    160 
    161161
    162162  printf ("World::releaseLoadScreen - end\n");
     
    614614    }
    615615 
     616  //glmis = new GLMenuImageScreen();
     617  glmis->init();
     618  //glmis->draw();
     619
    616620  // draw debug coord system
    617621  glCallList (objectList);
  • orxonox/branches/parenting/src/world.h

    r3342 r3361  
    1616class Camera;
    1717class PNode;
     18class GLMenuImageScreen;
    1819
    1920//! The game environment
     
    7273  bool bPause;
    7374
     75  GLMenuImageScreen* glmis;
     76
    7477  char* worldName;
    7578  int debugWorldNr;
Note: See TracChangeset for help on using the changeset viewer.