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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - De Wachter Jonathan

Pages: [1]
1
Graphics / 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

2
Audio / AL lib: ALc.c:1420: alcDestroyContext()
« on: November 09, 2011, 01:38:48 am »
Hello,

I get this output
Quote
AL lib: ALc.c:1420: alcDestroyContext(): deleting 1 Source(s)
AL lib: ALc.c:1818: alcCloseDevice(): deleting 3 Buffer(s)


when I run this : http://pastebin.com/BuVkHpPP
Quote
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>

int main()
{
    sf::Texture texture;
    texture.LoadFromFile("data/1440x900.jpg");
   
    sf::Sprite sprite(texture);

    sf::Music music;
    music.OpenFromFile("data/nice_music.ogg");
       
    music.Play();

   sf::RenderWindow window(sf::VideoMode(1440, 900), "SFML window"); // ,sf::Style::Fullscreen);
   
    while (window.IsOpened())
    {
        sf::Event event;
        while (window.PollEvent(event))
        {
            if (event.Type == sf::Event::Closed)
                window.Close();
        }

        window.Clear();
        window.Draw(sprite);
        window.Display();
    }

    return EXIT_SUCCESS;
}


I'm using the lastest revision of SFML2 (don't know how to get the number) on Fedora 16 (amd64), no proprietary drivers and my graphic card is Nvidia GT540M.

I must warm you that if I comment this line
Quote
window.Draw(sprite);

it works as expected...

Strange, isn't it ?

Thanx for helping!  :)

Pages: [1]
anything