All pastes #402798 Raw Edit

Mine

public cpp v1 · immutable
·published 2007-03-20 00:29 UTC
rendered paste body
  if(!isKeyPressed('Q'))  {    //blending    const BlendInfo& bi = bmd.mat3.blendInfos[mat.blendIndex];    if(bi.blendMode != 0 && bi.blendMode != 1 //support only none and blend for now      //|| bi.srcFactor >= 6 || bi.dstFactor >= 6 //don't support destination alpha for now      )    {      drawText("%s: Unsupported BlendInfo %d %d %d %d",        name.c_str(), bi.blendMode, bi.srcFactor, bi.dstFactor, bi.logicOp);      glDisable(GL_BLEND);    }    else    {      switch(bi.blendMode)      {        //case 0: //none        //  glDisable(GL_BLEND);        //  break;        case 0: //TODO: this should mean "don't blend", but links eyes don't                //work without this        case 1: //blend           //TODO: check for destination alpha etc          if(bi.srcFactor == 1 && bi.dstFactor == 0)            glDisable(GL_BLEND);          else          {            glBlendFunc(blendFunc(bi.srcFactor), blendFunc(bi.dstFactor));            glEnable(GL_BLEND);          }          break;      }    }  }  else    glDisable(GL_BLEND);