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

Pages: [1]
1
Graphics / Re: Title bar obscures first 27 pixels of the view
« on: April 16, 2019, 06:56:50 pm »
I try to keep things updated, honestly I do. Windows never told me my graphics drivers were outdated, Intel can't diagnose drivers due to my laptop being Dell, and Dell isn't the most intuitive when it comes to graphic driver updates.
But after some digging on Dell's website I got my drivers update and I'm now back in business!
Thanks a ton eXpl0it3r!

2
Graphics / Title bar obscures first 27 pixels of the view
« on: April 16, 2019, 04:40:40 pm »
If I draw any object to position (0,0), the first 27 vertical pixels of that object will be obscured by the title bar. If I'm in fullscreen I can see the first 27 pixels.
I am on Windows 10, Visual Studio 2017, using SFML 2.5.1 with the 64bit DLLs (But I've confirmed this also happens with 32bit DLLs)

#include <SFML/Graphics.hpp>

int main(int argc, char** argv[])
{
        sf::RenderWindow window(sf::VideoMode(320, 240), "RectangleTest");

        while (window.isOpen())
        {
                sf::Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                        {
                                // Close window button when clicked
                                window.close();
                        }
                }

                window.clear(sf::Color::Black);

                sf::RectangleShape FirstRect;
                FirstRect.setSize(sf::Vector2f(320, 10));
                FirstRect.setFillColor(sf::Color::Red);
                FirstRect.setPosition(sf::Vector2f(0, 0));

                sf::RectangleShape SecondRect;
                SecondRect.setSize(sf::Vector2f(320, 10));
                SecondRect.setFillColor(sf::Color::Blue);
                SecondRect.setPosition(sf::Vector2f(0, 10));

                sf::RectangleShape ThirdRect;
                ThirdRect.setSize(sf::Vector2f(320, 10));
                ThirdRect.setFillColor(sf::Color::Green);
                ThirdRect.setPosition(sf::Vector2f(0, 20));

                window.draw(FirstRect);
                window.draw(SecondRect);
                window.draw(ThirdRect);

                // Draw here
                window.display();
        }


        return EXIT_SUCCESS;
}
 





For good measure, here's another example with a 20 pixel offset. Notice the red is still partially obscured.

...

                sf::RectangleShape FirstRect;
                FirstRect.setSize(sf::Vector2f(320, 10));
                FirstRect.setFillColor(sf::Color::Red);
                FirstRect.setPosition(sf::Vector2f(0, 20));

                sf::RectangleShape SecondRect;
                SecondRect.setSize(sf::Vector2f(320, 10));
                SecondRect.setFillColor(sf::Color::Blue);
                SecondRect.setPosition(sf::Vector2f(0, 30));

                sf::RectangleShape ThirdRect;
                ThirdRect.setSize(sf::Vector2f(320, 10));
                ThirdRect.setFillColor(sf::Color::Green);
                ThirdRect.setPosition(sf::Vector2f(0, 40));

...
 




Pages: [1]
anything