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

Pages: [1]
1
SFML wiki / Frame Interpolation Example
« on: December 14, 2024, 07:43:25 pm »
Hello,

I had trouble finding an SFML specific example of frame interpolation, so I made one and put it on the wiki.

https://github.com/SFML/SFML/wiki/Frame-Interpolation-Example

2
Graphics / Re: Vertex Array inconsistency across GPUs?
« on: December 14, 2024, 08:13:27 am »
Thank you very much for the explanation. So, using instead 2 triangles...

This gives new.png (rtx4060):
        BG1[0].position = BottomLeft;
        BG1[1].position = BottomRight;
        BG1[2].position = TopLeft;

        BG1[0].color = sf::Color(255,   0,   0, 255);
        BG1[1].color = sf::Color(  0,   0,   0,   0);
        BG1[2].color = sf::Color(  0,   0,   0,   0);


        BG2[0].position = TopRight;
        BG2[1].position = TopLeft;
        BG2[2].position = BottomRight;

        BG2[0].color = sf::Color(255, 255, 255, 255);
        BG2[1].color = sf::Color(  0,   0,   0,   0);
        BG2[2].color = sf::Color(  0,   0,   0,   0);

And this gives old.png (gtx960):
        BG1[0].position = TopLeft;
        BG1[1].position = BottomLeft;
        BG1[2].position = TopRight;

        BG1[0].color = sf::Color(  0,   0,   0,   0);
        BG1[1].color = sf::Color(255,   0,   0, 255);
        BG1[2].color = sf::Color(255, 255, 255, 255);


        BG2[0].position = BottomRight;
        BG2[1].position = BottomLeft;
        BG2[2].position = TopRight;

        BG2[0].color = sf::Color(  0,   0,   0,   0);
        BG2[1].color = sf::Color(255,   0,   0, 255);
        BG2[2].color = sf::Color(255, 255, 255, 255);

3
Graphics / Vertex Array inconsistency across GPUs?
« on: December 13, 2024, 07:32:34 pm »
Hi there,

I recently decided to resume work on one of my old SFML games. After I setup SFML 2.6.2 on a new laptop and ran my code, I was surprised that my backgrounds, which I drew using Vertex Arrays, looked completely different.

In the attached images, you can see screenshots of the very same program ran on two different machines: one on a win10 PC with a GTX 960, and the other on a win11 PC with an RTX 4060.

Is it normal for different GPUs to draw the same Vertex Array in such a vastly different way?

        BG.setPrimitiveType(sf::Quads);
        BG.resize(4);

        BG[0].position = sf::Vector2f(0.f, 1080.f);
        BG[1].position = sf::Vector2f(0.f, 0.f);
        BG[2].position = sf::Vector2f(1920.f, 0.f);
        BG[3].position = sf::Vector2f(1920.f, 1080.f);

        BG[0].color = sf::Color(255,0,0,255);
        BG[1].color = sf::Color(0,0,0,0);
        BG[2].color = sf::Color(255,255,255,255);
        BG[3].color = sf::Color(0,0,0,0);

Pages: [1]