Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5323 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Oct 8, 2005, 5:27:22 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Shaders can now be loaded via the ResourceManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npc2.cc

    r5313 r5323  
    3232
    3333  this->loadModelWithScale("models/ships/bolido.obj", 3);
    34   this->shader = new Shader("toon.vert", "toon.frag");
    35   this->shader->activateShader();
    36   //exit(-1);
     34  this->shader = Shader::getShader("toon.vert", "toon.frag");
    3735
    3836  this->obj = gluNewQuadric();
     
    4442NPC2::~NPC2 ()
    4543{
    46   delete this->shader;
     44  Shader::unload(this->shader);
    4745  gluDeleteQuadric(this->obj);
    48 
    4946}
    5047
     
    8784  glMultMatrixf((float*)matrix);
    8885
    89   shader->activateShader();
     86  if (this->shader != NULL && this->shader != Shader::getActiveShader())
     87  {
     88    shader->activateShader();
     89  }
    9090  gluSphere(this->obj, 3, 10, 10);
    9191  //shader->deactivateShader();
Note: See TracChangeset for help on using the changeset viewer.