Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6812 in orxonox.OLD for trunk/src


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

trunk: Particles should work again

Location:
trunk/src/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/event/event_handler.cc

    r6802 r6812  
    262262    SDL_WM_GrabInput(SDL_GRAB_OFF);
    263263  else
    264     SDL_WM_GrabInput(SDL_GRAB_ON);
     264    ;//SDL_WM_GrabInput(SDL_GRAB_ON);
    265265}
    266266
  • 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
  • trunk/src/lib/particles/sprite_particles.cc

    r6799 r6812  
    112112  if (checkLight == GL_TRUE)
    113113    glDisable(GL_LIGHTING);
     114
    114115  glEnable(GL_ALPHA_TEST);
    115   glEnable(GL_DEPTH_TEST);
     116  glDepthMask(GL_FALSE);
     117  /*
    116118  glClearDepth(1.0);
    117119  glDepthFunc(GL_LEQUAL);
     
    122124  glEnable(GL_TEXTURE_2D);
    123125  glEnable(GL_CULL_FACE);
    124 
    125   glMatrixMode(GL_MODELVIEW);
     126  */
    126127  //glDepthMask(GL_FALSE);
    127128//glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
     
    170171    drawPart = drawPart->next;
    171172  }
    172   //glDepthMask(GL_TRUE);
     173  glDepthMask(GL_TRUE);
    173174  glPopAttrib();
    174175}
Note: See TracChangeset for help on using the changeset viewer.