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

Author Topic: How do I do backgrounds? [Not Relevant anymore]  (Read 8543 times)

0 Members and 1 Guest are viewing this topic.

olafurw

  • Newbie
  • *
  • Posts: 10
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
How do I do backgrounds? [Not Relevant anymore]
« Reply #1 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.
Laurent Gomila - SFML developer

olafurw

  • Newbie
  • *
  • Posts: 10
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #2 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
How do I do backgrounds? [Not Relevant anymore]
« Reply #3 on: December 27, 2009, 12:31:33 am »
No, I still don't know what happens with Windows 7.
Laurent Gomila - SFML developer

Metapyziks

  • Newbie
  • *
  • Posts: 33
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #4 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.

Metapyziks

  • Newbie
  • *
  • Posts: 33
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #5 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.

olafurw

  • Newbie
  • *
  • Posts: 10
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #6 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.

Luinechor

  • Guest
How do I do backgrounds? [Not Relevant anymore]
« Reply #7 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.

Nothingness0x

  • Sr. Member
  • ****
  • Posts: 292
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #8 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:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
How do I do backgrounds? [Not Relevant anymore]
« Reply #9 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.
Laurent Gomila - SFML developer

olafurw

  • Newbie
  • *
  • Posts: 10
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #10 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
How do I do backgrounds? [Not Relevant anymore]
« Reply #11 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 :)
Laurent Gomila - SFML developer

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #12 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.
I use the latest build of SFML2

Metapyziks

  • Newbie
  • *
  • Posts: 33
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #13 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

olafurw

  • Newbie
  • *
  • Posts: 10
    • View Profile
How do I do backgrounds? [Not Relevant anymore]
« Reply #14 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.

 

anything