SFML community forums

Help => Window => Topic started by: Christopher Jozwiak on May 01, 2015, 04:05:24 am

Title: Call to draw() crashes program.
Post by: Christopher Jozwiak on May 01, 2015, 04:05:24 am
I am attempting to compile a very simple program with SFML.  Any attempt to draw a simple sf::RectangleShape results in a crash.  I have compiled SFML 2 using mingw-gcc 4.8.1 and can compile it perfectly fine without a draw call.  I have an outdated system and am on windows 7 and my GFX Card doesnt only had drivers for XP.  I have those installed.  I'm assuming this is the core of the problem but wanted another opinion. 

#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

#define Window_Height 800
#define Window_Width 600



int main(){

    sf::RenderWindow window(sf::VideoMode(Window_Height, Window_Width), "First SFML Game");
    sf::RectangleShape arrofshape[10];
    sf::RectangleShape shape;
    bool draw = 1;
    for (int i; i < 10; i++){
        arrofshape[i].setFillColor(sf::Color::Red);
        arrofshape[i].setScale(sf::Vector2f(10,10));
    }

    while (window.isOpen()){

        sf::Event event;

        while(window.pollEvent(event)){

            if (event.type == event.Closed){
                window.close();
            }
        }

    window.clear(sf::Color::Black);

    window.display();

    }




    return 0;
}
 
Title: Re: Call to draw() crashes program.
Post by: eXpl0it3r on May 01, 2015, 04:09:00 am
What is your GPU model and what's the driver version?
Title: Re: Call to draw() crashes program.
Post by: Christopher Jozwiak on May 01, 2015, 04:16:42 am
What is your GPU model and what's the driver version?

Intel(R) 82865G Graphics Controller

Driver Version: 6.14.10.4363

Some more info:

DirectX* Version:      9.0
Physical Memory:      1527 MB
Minimum Graphics Memory:   8 MB
Maximum Graphics Memory:   96 MB
Graphics Memory in Use:   8 MB
Processor:      x86
Processor Speed:      2793 MHZ
Title: Re: Call to draw() crashes program.
Post by: binary1248 on May 01, 2015, 09:53:32 am
You have 3 (or 4) options:
The choice is yours.
Title: Re: Call to draw() crashes program.
Post by: lorence30 on May 07, 2015, 02:21:19 pm
http://en.sfml-dev.org/forums/index.php?topic=18094.15
You can read this thread.

But you should try first their solutions