Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7057 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Feb 6, 2006, 3:21:49 PM (19 years ago)
Author:
bensch
Message:

Textures can now be set the glBlendFunc, and Creature-Target-Fix

Location:
trunk/src
Files:
3 edited

Legend:

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

    r6812 r7057  
    4848  this->ambientTexture = NULL;
    4949  this->specularTexture = NULL;
     50  this->sFactor = GL_SRC_ALPHA;
     51  this->tFactor = GL_ONE;
    5052
    5153  this->setName(mtlName);
     
    112114  {
    113115    glEnable(GL_BLEND);
    114     glBlendFunc(GL_SRC_ALPHA, GL_ONE/*_MINUS_SRC_ALPHA*/);
     116    glBlendFunc(this->sFactor, this->tFactor);
    115117  }
    116118  else
  • trunk/src/lib/graphics/importer/material.h

    r6769 r7057  
    4646  void setTransparency (float trans);
    4747  void setTransparency (char* trans);
     48  void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; };
    4849
    4950 // MAPPING //
     
    6364    float       shininess;        //!< The shininess of the Material.
    6465    float       transparency;     //!< The transperency of the Material.
     66    GLenum      sFactor;
     67    GLenum      tFactor;
    6568
    6669    Texture*    diffuseTexture;   //!< The diffuse texture of the Material.
  • trunk/src/world_entities/creatures/md2_creature.cc

    r7053 r7057  
    171171
    172172   this->cameraConnNode.addChild(this->getWeaponManager()->getFixedTarget());
     173  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false);
     174
    173175  this->getWeaponManager()->getFixedTarget()->setRelCoor(10,0,0);
    174176
Note: See TracChangeset for help on using the changeset viewer.