SFML community forums

Help => Graphics => Topic started by: De Wachter Jonathan on November 09, 2011, 02:04:28 am

Title: Using sf::RenderTexture crashes silently
Post by: De Wachter Jonathan on November 09, 2011, 02:04:28 am
Hello,

This code prints Hello world but exits with code 1
Code: [Select]
#include <iostream>
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderTexture renderTexture;
    renderTexture.Create(512, 512);
    renderTexture.Clear();
    //renderTexture.Display();
 
    std::cout << "Hello world!" << std::endl;

    return EXIT_SUCCESS;
}


If I uncomment the line which calls Display of renderTexture, it crashes silently and I get 1 as exited code. And doesn't print Hello world anymore :(
Code: [Select]
#include <iostream>
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderTexture renderTexture;
    renderTexture.Create(512, 512);
    renderTexture.Clear();
    renderTexture.Display();
 
    std::cout << "Hello world!" << std::endl;

    return EXIT_SUCCESS;
}


I'm using the lastest version (commit 017ef652f9).
OS: Fedora 16 (64bits)
GC: Nvidia Getforce GT540M

I must add that my computer also has an intel GPU but I'm not aware of how fedora uses them (nvidia and intel gpu).

Can anyone help me? :D
Title: Using sf::RenderTexture crashes silently
Post by: Laurent on November 09, 2011, 07:48:17 am
I think it's your Intel GPU which makes it crash. RenderTexture is known to work very badly with these GPUs.