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

Author Topic: Using sf::RenderTexture crashes silently  (Read 1184 times)

0 Members and 1 Guest are viewing this topic.

De Wachter Jonathan

  • Newbie
  • *
  • Posts: 2
    • View Profile
Using sf::RenderTexture crashes silently
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Using sf::RenderTexture crashes silently
« Reply #1 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.
Laurent Gomila - SFML developer

 

anything