Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 7, 2005, 5:22:44 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the Trunk/importer back here.
merged with command:
svn merge -r 3918:HEAD ../../trunk/src/lib/graphics/importer/ src/lib/graphics/importer/

this fixed the issue with the segfault. It really was an error in the Model-class
@nico:

  1. sorry
  2. thanks for pointing this out to me
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/heightMap/src/lib/graphics/importer/material.cc

    r3914 r4111  
    8888 
    8989  // setting the transparency
    90   if (this->transparency == 1.0)
    91     {
    92       glDisable(GL_BLEND);
    93     }
    94   else
     90  if (this->transparency < 1.0)
    9591    {
    9692      glEnable(GL_BLEND);
     
    9894      glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    9995    }
     96  else
     97    {
     98      glDisable(GL_BLEND);
     99      glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
     100    }
     101
    100102
    101103  // setting illumination Model
     
    109111      glEnable(GL_TEXTURE_2D);
    110112      glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
     113
     114      /* This allows alpha blending of 2D textures with the scene */
     115      if (this->diffuseTexture->hasAlpha())
     116        {
     117          glEnable(GL_BLEND);
     118          glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     119        }
    111120    }
    112121  else
Note: See TracChangeset for help on using the changeset viewer.