Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6812 in orxonox.OLD for trunk/src/lib/graphics/importer


Ignore:
Timestamp:
Jan 28, 2006, 4:43:57 PM (19 years ago)
Author:
bensch
Message:

trunk: Particles should work again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/material.cc

    r6799 r6812  
    108108
    109109  // setting the transparency
    110   if (this->transparency < 1.0)
    111     {
    112       glEnable(GL_BLEND);
    113       glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    114       //glColor4f(*(this->diffuse), *(this->diffuse+1), *(this->diffuse+2), this->transparency);
    115     }
     110  if (this->transparency < 1.0 ||       /* This allows alpha blending of 2D textures with the scene */
     111      (this->diffuseTexture && this->diffuseTexture->hasAlpha()))
     112  {
     113    glEnable(GL_BLEND);
     114    glBlendFunc(GL_SRC_ALPHA, GL_ONE/*_MINUS_SRC_ALPHA*/);
     115  }
    116116  else
    117117    {
     
    131131      glEnable(GL_TEXTURE_2D);
    132132      glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
    133 
    134       /* This allows alpha blending of 2D textures with the scene */
    135       if (this->diffuseTexture->hasAlpha())
    136         {
    137           glEnable(GL_BLEND);
    138           glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    139         }
    140133    }
    141134  else
Note: See TracChangeset for help on using the changeset viewer.