Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3394 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Feb 3, 2005, 2:01:04 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: now the loadscreen uses material instead of Textures.

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/glmenu_imagescreen.cc

    r3380 r3394  
    1919#include "glmenu_imagescreen.h"
    2020#include "importer/texture.h"
     21#include "importer/material.h"
    2122
    2223using namespace std;
     
    4748   \todo this deconstructor is not jet implemented - do it
    4849*/
    49 GLMenuImageScreen::~GLMenuImageScreen () {}
     50GLMenuImageScreen::~GLMenuImageScreen()
     51{
     52  if (backMat)
     53    delete backMat;
     54}
    5055
    5156
     
    6671  glMatrixMode(GL_MODELVIEW);
    6772
    68   this->backTex = new Texture();
    69   this->backTex->loadImage("orx_tex.bmp");
    70 
    7173  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    7274  glLoadIdentity();
     
    7981 
    8082  // Select Our VU Meter Background Texture
    81   this->backTex = new Texture();
    82   this->backTex->loadImage("../data/pictures/load_screen.jpg");
    83 
     83  this->backMat = new Material("load_screen");
     84  this->backMat->setDiffuseMap("../data/pictures/load_screen.jpg");
    8485  this->maxValue = 10;
    8586  this->currentValue = 0;
     
    170171  glDisable(GL_LIGHTING);
    171172
     173  backMat->select();
    172174  glBegin(GL_QUADS);
    173175  glColor3f(0.96, 0.84, 0.34);
  • orxonox/trunk/src/glmenu_imagescreen.h

    r3368 r3394  
    1111
    1212class Texture;
     13class Material;
    1314
    1415class GLMenuImageScreen : public BaseObject {
     
    3940
    4041 private:
    41   char* backImageName;       //! the name of the file of the background image
    42   float height, width;       //! hight and width of the image
    43   float offsetX, offsetY;    //! offset of the image from left and up
    44   Texture* backTex;          //! background texture
    45   int currentValue;          //! the current count of step() calls fired yet
    46   int maxValue;               //! total count of steps
     42  char* backImageName;       //!< the name of the file of the background image
     43  float height, width;       //!< hight and width of the image
     44  float offsetX, offsetY;    //!< offset of the image from left and up
     45  Material* backMat;         //!< Background Material.
     46  int currentValue;          //!< the current count of step() calls fired yet
     47  int maxValue;              //!< total count of steps
    4748
    4849};
Note: See TracChangeset for help on using the changeset viewer.