[xmoto-dev] [Fwd: Black line]

[ Thread Index | Date Index | More lists.tuxfamily.org/xmoto-dev Archives ]


Manu, that's for you.
--- Begin Message ---
Dear Nicolas,

I've found out why the black line is displayed. The filter mode of the background pictures is FM_LINEAR. This means that when a image is stretched, a pixel takes the mean of the value of the 4 surrounding pixels. On the edges the pixels will take the value from the background because there is no neighbour pixel. The background color (GL_TEXTURE_BORDER_COLOR) is black, so there will be a black line.

With this amelioration there is no more black line:
GameInit.cpp line 270:

/* Load title screen textures + cursor + stuff */
      m_pTitleBL = NULL;
      pSprite = m_theme.getSprite(SPRITE_TYPE_UI, "TitleBL");
      if(pSprite != NULL) {
        m_pTitleBL = pSprite->getTexture(false, true, FM_NEAREST); // no more FM_LINEAR due to black line
      }

      m_pTitleBR = NULL;
      pSprite = m_theme.getSprite(SPRITE_TYPE_UI, "TitleBR");
      if(pSprite != NULL) {
        m_pTitleBR = pSprite->getTexture(false, true, FM_NEAREST);
      }

      m_pTitleTL = NULL;
      pSprite = m_theme.getSprite(SPRITE_TYPE_UI, "TitleTL");
      if(pSprite != NULL) {
        m_pTitleTL = pSprite->getTexture(false, true, FM_NEAREST);
      }

      m_pTitleTR = NULL;
      pSprite = m_theme.getSprite(SPRITE_TYPE_UI, "TitleTR");
      if(pSprite != NULL) {
        m_pTitleTR = pSprite->getTexture(false, true, FM_NEAREST);
      }

I hope this is helpful.
Regards
Christian



Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
--- End Message ---


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/