SFML community forums

Help => Graphics => Topic started by: olafurw on December 26, 2009, 11:35:39 pm

Title: How do I do backgrounds? [Not Relevant anymore]
Post by: olafurw on December 26, 2009, 11:35:39 pm
This is baffling me. (I'm using Windows 7 btw)

I have a few sprites that I walk around the screen, this works very smooth and well.

As soon as I try to create some sort of a background sprite, everything slows down to a crawl.

I've tried two ways, one was to have a 800x600 image as a sprite and draw that every time (the image was only 11KB), but the whole program became very slow.

Then I tried the loop in a loop way to tile 50x50 images, and still this is as slow as the first method.

So how do I proceed?
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Laurent on December 26, 2009, 11:57:33 pm
The first way shouldn't be slow at all. A few users have performances issues with Windows 7, you should try your program on another OS if you can.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: olafurw on December 27, 2009, 12:07:09 am
I can't try another OS at the moment, but lets assume that this is a problem in Windows 7. Do you know what I could try to fix this problem?
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Laurent on December 27, 2009, 12:31:33 am
No, I still don't know what happens with Windows 7.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Metapyziks on December 27, 2009, 01:19:17 am
I can confirm this with Windows 7.

I am trying to use a pair of buffer images which are drawn to a window every frame. Goes at about 11 FPS  :(

If I comment out the lines that draw the images to the window, it shoots up to over 150 FPS.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Metapyziks on December 27, 2009, 01:36:32 am
Fixed: I updated my video drivers, and now it runs fine.
According to something I read somewhere its because the drivers you get with windows 7 (surprise surprise) don't support opengl, so have to interface with direct x instead.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: olafurw on December 27, 2009, 01:43:04 am
There are no updated display drivers for my laptop. So it seems I'm out of luck.

Probably going to switch to Allegro then or something. It's a damn shame.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Luinechor on December 27, 2009, 03:45:19 am
Quote from: "olafurw"
There are no updated display drivers for my laptop. So it seems I'm out of luck.


You could look at http://www.laptopvideo2go.com/ - perhaps they do have some modded driver for you laptop.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Nothingness0x on December 27, 2009, 03:34:01 pm
That's scaring me out, because I'm gonna buy a new computer and so I will probably have window 7 with it. If I cannot keep on using SFML, it's gonna be bad. There's no way I'll give up SFML for another lib  :cry:
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Laurent on December 27, 2009, 04:40:10 pm
People having problems with Windows 7 and SFML should test another OpenGL application to see what's wrong (SFML or the OpenGL driver).

There's absolutely no reason for SFML to be so slow on Windows 7.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: olafurw on December 30, 2009, 03:04:45 am
Just played Quake 2 at a lan in OpenGL and it works perfectly. So nothing wrong with the OpenGL setup.

So I'm wondering if I should try SFML 2, but the thing is, that this is not a project I can run on a preview build.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Laurent on December 30, 2009, 11:01:45 am
That's really weird.

It would be interesting to get some feedback about SFML 2 & Windows 7, if someone can try this combination :)
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: OniLinkPlus on December 30, 2009, 09:31:30 pm
I've been using SFML2 with Windows 7 Build 7100 and have not experienced any lag. Then again I do have ATi's Catalyst Drivers installed.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Metapyziks on December 30, 2009, 09:33:53 pm
Quote from: "Laurent"
It would be interesting to get some feedback about SFML 2 & Windows 7, if someone can try this combination :)


I'm using both, in VC++ 2008 express. Works perfectly so far :D
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: olafurw on December 31, 2009, 02:37:35 am
I tried a compiled version of my app on another Windows 7 machine and it worked perfectly there.

That machine was a 32bit W7 machine though, and mine is 64bit W7.

Then I tried it on another W7 machine that is 64 bit and I had the same slowdown issue as I had before.

So there is something going on in W7 64bit. Be it SFML or OpenGL.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: phear- on December 31, 2009, 05:47:08 pm
I'm not having any troubles with windows 7 x64 and SFML 2
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: OniLinkPlus on December 31, 2009, 11:13:27 pm
Also, I am using x64 Win7, so that's probably not the problem.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: olafurw on January 01, 2010, 12:23:33 am
Are you two using ATI cards?
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: Dravere on January 01, 2010, 03:58:21 am
I use 32 bit binaries of SFML on x64 Win7 with Nvidia card. I don't have the problem mentioned.

Dravere
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: OniLinkPlus on January 01, 2010, 05:02:59 am
Quote from: "olafurw"
Are you two using ATI cards?
Yes.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: phear- on January 02, 2010, 04:20:04 am
yeah, radeon hd 4770
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: olafurw on January 05, 2010, 01:15:48 am
Back home, at my desktop.

W7 64bit with an NVIDIA Card, had the same issues as before and then I installed the latest drivers from the NVIDIA site. Works like a charm.

So it could be issues on Laptops with W7 64bit and ATI Cards.

Sounds like fun.

I also tried other SFML projects and it's the same.
Title: How do I do backgrounds? [Not Relevant anymore]
Post by: olafurw on January 12, 2010, 10:05:10 pm
I have the source of the problem but unfortunately this is a problem that will not be fixed.

This is not a SFML problem, just to be clear. It's a mixture of Microsoft, ATI and Fujitsu.

> Mobility 2300 GPU's are legacy and not supported for Windows 7.

This is a reply from a mod over on the ATI GAME forums.