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

Pages: [1]
1
General / Re: Problem with cursor and screen artifacts
« on: April 12, 2015, 09:32:52 pm »
Thanks for ideas but it's not that.

I have latest drivers and I see it is actualy not related to SFML. It even happens in paint, but I'm not sure if it's not only OpenGL/soft. Just tested in unity and it's working ok.

@edit
In Blender and Gimp (OpenGL) it's happening.

Just so you can imagine what I'm talking about it looks like this http://i.imgur.com/oEON38X.png but only if I move the mouse (or rather when cursor is moving because when I stop video or go frame-by-frame it not happens).

@edit2
In Paint.NET (DirectX) it's not happening.

@edit3
Ok, I'm lost.

SDL (DirectX on Windows) is doing this weird thing to me but PyGame (which uses SDL) is not.
Custom cursor in SFML is still doing this to me.

@edit4
More tests, Windows GDI with a little space between lines does that (but it's not that much visible as in SFML/SDL) and wxWidgets (python binding) with Cairo drawing (I guess) does not (even with 1 px space).

Magic.

2
General / Re: Problem with cursor and screen artifacts
« on: April 12, 2015, 08:25:45 pm »
Wow, it seems to be only on my computer, can't screenshoot it but I see it playing that video.

I think it is problem with my hardware/display screen or with Windows cursor, I'm on high DPI. When I disable cursor it works normal. But I do not have this problem in games (with native cursor ofc) or in Unity/UE4.

3
General / Problem with cursor and screen artifacts
« on: April 12, 2015, 07:01:05 pm »
Hi, I think I have done something wrong but can't find what.

I have recorded video (attachment) of what is happening as it will be easiest way to show what I mean.

First (and most important): if I move my cursor some black circle is going around cursor.

My main loop is:
        while (renderWindow->isOpen())
        {
                sf::Event event;
                while (renderWindow->pollEvent(event))
                {
                        // close window
                        if (event.type == sf::Event::Closed)
                                renderWindow->close();

                        // update title with mouse position
                        if (event.type == sf::Event::MouseMoved)
                        {
                                // update title
                                auto mouseWorldPos = renderWindow->mapPixelToCoords(sf::Vector2i(event.mouseMove.x, event.mouseMove.y));
                                std::stringstream title;
                                title << Config::Window::Title.toAnsiString() << " -";
                                title << " X: " << mouseWorldPos.x;
                                title << " Y: " << mouseWorldPos.y;

                                renderWindow->setTitle(title.str());
                        }
                       
                        // resize view of render window when resized
                        if (event.type == sf::Event::Resized)
                        {
                                sf::FloatRect visibleArea(0.f, 0.f, static_cast<float>(event.size.width), static_cast<float>(event.size.height));
                                renderWindow->setView(sf::View(visibleArea));
                        }

                        if (windowCallback)
                                windowCallback->onEvent(event);
                }

                renderWindow->clear(Config::Window::ClearColor);
                if (windowCallback)
                        windowCallback->onRender();
                renderWindow->display();
        }

and I draw RectangleShapes in a loop like (it's windowCallback->onRender()):
        // [...] just assign sf::Vector2f gridSize, gridPositionStart and int verticalLinesCount
        sf::RectangleShape lineShape;
        lineShape.setSize(sf::Vector2f(1.f, gridSize.y));

        for (int i = 0; i < verticalLinesCount; i++)
        {
                lineShape.setPosition(gridPositionStart.x + i * Config::Grid::GridSpace, gridPositionStart.y);
                Render->draw(lineShape);
        }

Render is just RenderWindow.

I'm not sure where is a problem.

I'm using SFML 2.2 static with VS2013 Community.
Windows 8.1 x64 with GTX 970.

Pages: [1]