Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFML on Termux #158

Open
yoshy3904 opened this issue Jul 16, 2022 · 1 comment
Open

SFML on Termux #158

yoshy3904 opened this issue Jul 16, 2022 · 1 comment

Comments

@yoshy3904
Copy link

yoshy3904 commented Jul 16, 2022

I have compiled a sfml application with the sfml package in the x11-repo. It should open a 200x200 px window displaying a green circle.

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);
    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }
        window.clear();
        window.draw(shape);
        window.display();
    }
    return 0;
}

I have problems running the application. I set up an VNC-Server, set DISPLAY=:0, but when trying to run the application ./sfml-app I get the error:
Error of failed request: BadMatch(invalid parameter attributes)
Major opcode of failed request: 1 (X_CreateWindow)
Serial number of failed request: 14
Current serial number in output stream: 16

@O5MO
Copy link

O5MO commented Nov 7, 2022

I have the exact same issue, even when the code is just

**#include <SFML/Graphics.hpp>
int main()

{
sf::RenderWindow window;
}**
, i get this error:
X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 1 (X_CreateWindow) Serial number of failed request: 14 Current serial number in output stream: 16
If i comment out the "sf::RenderWindow window;" it works fine, so the problem is that it cant create a window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants