Advertisement
lucasgautheron

Untitled

Apr 25th, 2011
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. // when drawctficon is called, GL_BLEND is disabled if flag is in base
  2. // & enabled if flag isn't
  3. if(flaginfos[i].state == CTFF_INBASE) glDisable(GL_BLEND); else glEnable(GL_BLEND);
  4.                 drawctficon(i*120+VIRTW/4.0f*3.0f, 1650, 120, i, 0, 1/4.0f);
  5.  
  6. // original turn_on_transparency :
  7. // (look : GL_BLEND is forced to enable)
  8. inline void turn_on_transparency()
  9. {
  10.     glEnable(GL_BLEND);
  11.     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  12.     glColor4ub(255, 255, 255, 255);
  13. }
  14.  
  15.  
  16. // fixed version ?
  17. // doesn't force gl blend state, already set by drawctficon
  18. inline void turn_on_transparency()
  19. {
  20.     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  21.     glColor4ub(255, 255, 255, 100);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement