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

Pages: [1]
1
I've discovered what the problem was.
I'm using a notebook with a geforce graphics card and processor integrated intel graphics card.
Both drivers were activated in devices. When I deactivated the intel graphics card and left only the nvidia driver, it worked as expected.

2
Actually, I just discovered that this problem has no relation to SFML, I made my simple program in raylib, another graphics library, and the same problem happens.

Any idea guys?

3
General / Drawing Methods Reference Out Of Place with Distortion ?
« on: July 18, 2024, 04:51:57 am »
Hello Friends,
When I execute this simple code:

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setPosition(0.0f,0.0f);
    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 placed the result I've got in the attachments.

I'm using windows 10 and compiling with mingw:

g++ -c main.cpp -DSFML_STATIC
g++ main.o -o main -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lgdi32 -lopengl32 -lwinmm

And it gets worse, as you can see I've made the program self sufficient, no dll's needed, when I execute the EXACT SAME PROGRAM in another computer, it works.

Please guys, tell me, what's going on?

It is suppose to show a green circle, centered on the screen.

Pages: [1]