Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Rendering differences between XP / 7  (Read 1792 times)

0 Members and 1 Guest are viewing this topic.

JordynMagz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Rendering differences between XP / 7
« 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!




Relic

  • Newbie
  • *
  • Posts: 43
    • View Profile
Rendering differences between XP / 7
« Reply #1 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?

JordynMagz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Rendering differences between XP / 7
« Reply #2 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

Jove

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • http://www.jestofevekites.com/
Rendering differences between XP / 7
« Reply #3 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
{much better code}

 

anything