SFML community forums

Help => Graphics => Topic started by: JordynMagz on March 07, 2011, 04:56:02 am

Title: Rendering differences between XP / 7
Post by: JordynMagz on March 07, 2011, 04:56:02 am
Im having some odd rendering issues with my project that I was hoping to get some help with. There are two things Id like help with.

1) I have defined my own draw function for my classes that uses the SFML Sprite class and this function will sometimes not work. It works all the time in windows XP and for this test I have, does not work for some sprites in windows 7. Here is the code for the draw:
Code: [Select]
{
if (m_currentFrame == m_numFrames)
{
m_currentFrame = 0;
}
else
{
m_currentFrame++;
}
m_frameBox.Left = m_imageX + m_currentFrame * m_width;
m_frameBox.Right = m_imageX + (m_currentFrame+1) * m_width;
m_frameBox.Top = m_imageY;
m_frameBox.Bottom = m_imageY +  m_height;
m_sprite.SetSubRect(m_frameBox);
m_sprite.SetX(m_mapX);
m_sprite.SetY(m_mapY);
app->Draw(m_sprite);
}

In my test I have 3 classes, all of which are extensions of the class in which this draw function is defined (so they are all using the same function). The draw works for all 3 classes in xp and only for 2 in 7... any idea why there is a difference?

Also, in windows 7 I'm getting black lines surrounding my tiles that I dont see in XP. Both issues are displayed in the pictures below.

Thanks for any help!

(http://www.iwu.edu/~jmaglala/xp.png)

(http://www.iwu.edu/~jmaglala/7.png)
Title: Rendering differences between XP / 7
Post by: Relic on March 07, 2011, 07:05:29 am
If the application is just the same on both OSs (PCs), may be it's a graphic driver issue on Windows 7?
Title: Rendering differences between XP / 7
Post by: JordynMagz on March 07, 2011, 07:21:44 am
It looks like on vista I have the same problem with the sprite, but the lines do not appear. :S
Title: Rendering differences between XP / 7
Post by: Jove on March 16, 2011, 10:43:10 pm
Could the black lines issue be related to not setting :

SetSmooth(false);

?

Just a shot in the dark from me.

Mark