[xmoto-dev] [Fwd: Black line] |
[ Thread Index | Date Index | More lists.tuxfamily.org/xmoto-dev Archives ]
Manu, that's for you.
--- Begin Message ---
- To: nadenislamarre@xxxxxxx
- Subject: Black line
- From: Aero Super <aero_super@xxxxxxxxx>
- Date: Fri, 22 Jun 2007 02:09:40 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=hku2GvlE8aqPkPRldRuO4rPxp8Qfo9MKDXaXhHozSTyZ79HavIlTCp+VvVSjklfmIfz/hoZH7iut02mhgqIRkp5bT9MVIkp536ugjBBGwPcDuCmIfXxAVFWWB0lkcvx/L5gsGj6Zv58gFObeJTzQ50RA1mRc85yQao1qIS4jEBk=;
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/ |