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

Author Topic: Problem running SFML apps  (Read 4441 times)

0 Members and 1 Guest are viewing this topic.

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« on: August 24, 2011, 04:58:51 pm »
Greetings,

It´s been some time since I last used SFML. I tried to run some of my SFML applications but I get this strange screen like it was not refreshing... nothing happens besides that.

I started a new project and I got this problem. First I thought it could be some mistake because it´s been a few months since I last used SFML, but I runned these old applications of mine and the same problem happens...

This new hardware I am using is 64-bit and the applications were written in a 32-bit environment... however the same applications runs fine on another 64-bit machine that I have.

Any ideas?

Thanks!
CJ

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Problem running SFML apps
« Reply #1 on: August 24, 2011, 05:47:22 pm »
Are the graphics card drivers up-to-date? In case you use dynamic libraries, do you provide the right ones?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« Reply #2 on: August 25, 2011, 07:07:10 pm »
I´ve reinstalled my driver just in case, but I still get the problem.

if I somehow made a mistake while setting up Codeblocks it would not compile anyway right?

But it is compiling with no problems or warnings...

Also I´ve tested the input and it seems to work. I ´ve put a test input condition inside the main loop and my test is printed in the console window. The RenderWindow on the other hand is completely frozen.
CJ

MorleyDev

  • Full Member
  • ***
  • Posts: 219
  • "It is not enough for code to work."
    • View Profile
    • http://www.morleydev.co.uk/
Problem running SFML apps
« Reply #3 on: August 25, 2011, 07:27:26 pm »
Were those applications written in SFML 1.6?
Does the PC that isn't working have an ATI graphics card?
If you answered yes to both questions, then it's most likely an issue with the ATI drivers and SFML 1.6 that was fixed in 2.0 ^^
UnitTest11 - A unit testing library in C++ written to take advantage of C++11.

All code is guilty until proven innocent, unworthy until tested, and pointless without singular and well-defined purpose.

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« Reply #4 on: August 25, 2011, 07:35:38 pm »
It´s nvidia Geforce Go 7150.
And it´s SFML 1.6
CJ

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Problem running SFML apps
« Reply #5 on: August 25, 2011, 09:38:59 pm »
Can we see some complete and minimal code that shows the problem?
I use the latest build of SFML2

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« Reply #6 on: August 25, 2011, 11:50:19 pm »
Here it goes...

Code: [Select]

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <iostream>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Shapes");

    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear screen
        App.Clear();

        // Draw predefined shapes

        App.Draw(sf::Shape::Circle(200, 200, 100, sf::Color::Yellow, 10, sf::Color::Blue));

        App.Display();
    }

    return EXIT_SUCCESS;
}
CJ

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« Reply #7 on: November 01, 2011, 01:24:37 am »
Well, I couldn´t fix this problem in that PC so I tried to setup SFML with Visual Studio (I was using Code::Blocks).

Now it runs but extremely slow while it is fast in other computers. Are there any additional considerations regarding Visual Studio? Is it the debug configuration? I mean, it is really really really slow like one click takes 20 seconds to take effect...
CJ

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« Reply #8 on: November 01, 2011, 12:12:45 pm »
It turns out that the problem is a combination of OS and my laptop. I´ve tested the same program on several different PC´s and it runs fine everywhere but in my laptop.

Strangely, when I had Windows Vista installed it also worked fine in the same laptop. Maybe driver problem when updating to Seven?
CJ

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Problem running SFML apps
« Reply #9 on: November 01, 2011, 02:45:43 pm »
Just make sure you have the latest drivers for your video card & Windows 7.

I use W7 and have no problems whatsoever!
SFML 2.1

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« Reply #10 on: November 08, 2011, 11:17:19 am »
Yeah, strangely my drivers are all up-to-date. Also, I have other PC with Windows 7 and it runs SFML with no problems.

I´ll have to wait until I can downgrade and test with Windows 7 32bit or Vista.
CJ

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« Reply #11 on: December 28, 2011, 11:41:59 pm »
Does it make sense to move to SFML 2 trying to solve this?
CJ

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Problem running SFML apps
« Reply #12 on: December 29, 2011, 01:18:58 am »
I think you should be asking: "Does it make sense to stay in SFML 1.6?"

SFML 2.0 fixed a lot of things... For instance, with SFML 1.6 you would not be able to run your program with an ATI card without some hacking.

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Problem running SFML apps
« Reply #13 on: December 29, 2011, 12:10:45 pm »
I´ve read a lot about this ATI issue but I am not using ATI and I get a similar problem. Perhaps my card has the same issue as those ATI´s.

Quote
I think you should be asking: "Does it make sense to stay in SFML 1.6?"


Well then let me rephrase that: considering that I am in the middle (more like 60%) of a project using 1.6, switching to 2.0 sounds like a good idea?
CJ