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 - rinzlerFix

Pages: [1]
1
General / Re: Can't load images
« on: July 13, 2016, 03:14:03 am »
Sorry for the double post, but I managed to fix the problem.

I switched to nvidia drivers, installed mesa vdpau and it works now  ;D

Thanks anyway Hapax

2
General / Re: Can't load images
« on: July 13, 2016, 02:03:45 am »
I've tested other images and no luck, also getcwd() gives me right path.

I was working on a little game project and I can't run it because of this problem, I remember that I've installed some composition software, and some other stuff on other machine with the same problem and suddenly this was fixed.

Machine specs,
Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
RAM 2GiB
G72 [GeForce 7500 LE]

[Edit]

If a change the default graphics driver to the nvidia a get another error, shown on the attached files.

Ps: Sorry about my English.

3
General / Can't load images
« on: July 13, 2016, 01:20:36 am »
Hi guys,

I have a fresh Ubuntu Mate install on one of my machines and a I can't load/display images.

#include <SFML/Graphics.hpp>

int main()
{
    // Create the main window
    sf::RenderWindow app(sf::VideoMode(800, 600), "SFML window");

    // Load a sprite to display
    sf::Texture texture;
    if (!texture.loadFromFile("cb.bmp"))
        return EXIT_FAILURE;
    sf::Sprite sprite(texture);

        // Start the game loop
    while (app.isOpen())
    {
        // Process events
        sf::Event event;
        while (app.pollEvent(event))
        {
            // Close window : exit
            if (event.type == sf::Event::Closed)
                app.close();
        }

        // Clear screen
        app.clear();

        // Draw the sprite
        app.draw(sprite);

        // Update the window
        app.display();
    }

    return EXIT_SUCCESS;
}
 

Everytime a try to execute the code I get a segmentation fault, but if a put a wrong path for the image (like "cb2.bmp") I get "Failed to load image "cb2.bmp". Reason: Unable to open file."

If a comment every line mentioning "texture" and "sprite", the program runs but obviosly I get a black screen.

I get the same results compiling directly from the console.

I've faced the same issues long ago on a previous Linux distro ("lubuntu"), but I fixed somehow. Driver issues?



Pages: [1]
anything