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

Pages: [1]
1
General / Re: Window xlib event issue? Solus Linux
« on: May 03, 2016, 11:42:04 am »
I'm not familiar with binary1248, but if I can help to further resolve this issue in any fashion, I'm happy to help. I'll keep an eye on this thread. And thank you again Exploiter.

2
General / Mutter doesn't think SFML is responding well
« on: May 03, 2016, 12:14:08 am »
Exploiter, thank you for your rapid reply. The code I used is below:

Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main window
    sf::RenderWindow app(sf::VideoMode(1920, 1080), "SFML window", sf::Style::Fullscreen);
    //sf::RenderWindow app(sf::VideoMode(1920, 1080), "SFML window");
    //app.setFramerateLimit(30);

    // Load a sprite to display
    sf::Texture texture;
    if (!texture.loadFromFile("../../../assets/images/star.png")) return EXIT_FAILURE;
    sf::Sprite sprite(texture);
    sprite.setOrigin(sprite.getGlobalBounds().width / 2, sprite.getGlobalBounds().height / 2);

// Start the game loop
    while (app.isOpen())
    {
        //sf::sleep(sf::milliseconds(100));
        // Process events
        sf::Event event;
        while (app.pollEvent(event))
        {
            // Close window : exit
            if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape) app.close();
            if (event.type == sf::Event::Closed) app.close();
        }

        // Clear screen
        app.clear();

        // Draw the sprite
        sprite.setPosition(sf::Mouse::getPosition(app).x, sf::Mouse::getPosition(app).y);
        app.draw(sprite);

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

    return EXIT_SUCCESS;
}

As you may see I tried sleep, framerates and a some odd solutions that had no ultimate effect.

Edit: As you can tell by my use of getGlobalBounds where I should have used getLocalBounds -- I'm comming back to tinker from a long break.

Edit2: Inserting
Code: [Select]
sf::sleep(sf::seconds(0)); after
Code: [Select]
app.display(); seems to prevent the supposed hang about half the time. It could be a clue!

3
General / Re: Window xlib event issue? Solus Linux
« on: May 02, 2016, 04:17:27 pm »
Same issue, but Fedora 23 with Gnome3 Desktop.

Windowed apps don't trigger the 5 second warning, fullscreen apps do.



SFML-2.3.2-1.fc23.x86_64
Linux 4.4.8-300.fc23.x86_64 #1 SMP GNU/Linux
Fedora release 23 (Twenty Three)

What other information do you need?


4
Graphics / Creating an SFML Window with OpenGL and X11
« on: October 20, 2011, 06:05:59 am »
Do programmers often tie OpenGL, X11 and SFML together? If so, what considerations are involved. If not, why - does creating an OpenGL context make the X11 considerations obsolete? I don't have access to teachers, so like many, I'm piecing my learning together from the Internet’s tutorial soup.

I have enjoyed using the concise tutorial on SFML & X11, and also the tutorial on SFML & OpenGL as bases for some experiments.

I'm am curious if someone could expound upon the relationship between OpenGL and X11, and how they both together may or may not tie into SFML.

Pages: [1]