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

Pages: [1]
1
Graphics / Re: sf::RenderTexture bug when destroyed in fullscreen
« on: July 22, 2013, 11:36:39 pm »
Thanks for the answer :)

¿Should I add a new track issue on github for this problem?

I hope there is a solution, somehow...

2
Graphics / Re: sf::RenderTexture bug when destroyed in fullscreen
« on: July 22, 2013, 02:36:29 pm »
Try it today on another computer (win 7 32 bits, nvidia 8600GT) and the result is the same "black blink" effect when Rendertexture is destroyed.

In windowed mode all run fine, smooth, without any flickering. But in fullscreen, everytime I destroy a rendertexture, or a entity that stores a rendertexture, because I don't gonna use it anymore, the flicker appears.

Try it with Vsynch enabled and same result.

¿Anyone with nvidia cards (or ati) can confirm this?

PS: I use Visual Studio 2010.

3
Graphics / sf::RenderTexture bug when destroyed in fullscreen
« on: July 21, 2013, 08:24:40 pm »
Greetings everyone.

I have integrated SFML in my project development that uses some RenderTextues, Sprites,... and when try it t run in fullscreen, the entity that stores the RenderTexture is destroyed, cause some sort of flickering in the screen.

For 1-2 frames, the screen goes black and then return to normal. Trying to reproduce this problem, I've discovered what causes this comportament but not why.

In the following code, I find that when a RenderTexture is destroyed (out of scope/delete), the problem appears.

My specs are Win 7 64 bits, Nvidia 560Ti (driver version 320.49 WHQL), i5 2500k.

#include <iostream>
#include <SFML\Graphics.hpp>
#include <SFML\Window.hpp>


int main()
{
    sf::RenderWindow App(sf::VideoMode(640, 480, 32), "SFML Test", sf::Style::Fullscreen);
        App.setFramerateLimit(60);

        sf::RectangleShape rect(sf::Vector2f(300,300));
        rect.setFillColor(sf::Color::White);
        rect.setPosition(170, 100);
       
        sf::RenderTexture *tex_ptr = NULL;
       
        while (App.isOpen())
        {
                sf::Event Event;

                while (App.pollEvent(Event))
        {
            // Close Window
            if (Event.type == sf::Event::Closed)
                return 1;

                        if (Event.type == sf::Event::KeyPressed)
                        {
                                // Exit
                                if (Event.key.code == sf::Keyboard::Escape)
                                        return 1;      

                                // Each time F1 is pressed, screen goes black in some sort flickering
                                if (Event.key.code == sf::Keyboard::F1)
                                {  
                                        sf::RenderTexture tex;
                                        tex.create(200,200);
                                }

                                // Each time F2 is pressed, screen goes black in some sort flickering
                                if (Event.key.code == sf::Keyboard::F2)
                                {  
                                        tex_ptr = new sf::RenderTexture();
                                        tex_ptr->create(200,200);
                                        delete tex_ptr; // if this line is commented, does not flick
                                }
                        }
                }

                App.clear();
                App.draw(rect);
                App.display();
        }

    return 0;
}
 

Pages: [1]
anything