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

Pages: [1]
1
I built master from 20 september, runned my test code and results are the same.

Anyway i tested it few more times and found out that behaviour depends on size and antialiasing level:
  -size 8000x1200, antialiasing 8             works
  -size 8000x1200, antialiasing 4             does not work
  -size 14000x1200, antialiasing 4 or 8   works
  -size 1200x5000, antialiasing 4 or 8     doesn not work
  -size 3300x5000, antialiasing 4 or 8     works
  -size 3300x7000, antialiasing 4 or 8     works
  -size 5480x2000, antialiasing 4             doesn not work
  -size 5480x2000, antialiasing 8              works

works -  RAM freed
does not works -  RAM not freed


Maybe its hardware/software specific or somthing in openGL.

2
When RenderTexture is created inside member function with big size(5000, 1000) and antialiasing is set it deos not get destoryed correctly, i checked ram usage using Windows Task Manager.

SFML version: 2.5.1
Microsoft Visual Studio Community 2019 - Version 16.7.3
Debug x64


Includes:

#include "SFML/Graphics.hpp"
#include "Windows.h"


Here is test class with 2 tests:
test1 - antialiasing is turned on(4)
test2 - antialiasing is turned off(0)

class TestRenderTexture {
public:
        void test1() {
                sf::RenderTexture tex;
                tex.create(5000, 1000, sf::ContextSettings(0, 0, 4, 1, 1, 0, false));
                tex.clear(sf::Color::Transparent);
                tex.display();
        }
        void test2() {
                sf::RenderTexture tex;
                tex.create(5000, 1000, sf::ContextSettings(0, 0, 0, 1, 1, 0, false));
                tex.clear(sf::Color::Transparent);
                tex.display();
        }
};


My main:

int main() {
        TestRenderTexture test;
        test.test1(); // run test1 or test2 here

        sf::RenderWindow window(sf::VideoMode(1200, 675), "Test");

        //loop keeps program open
        while (window.isOpen()) {
                Sleep(400);
                sf::Event ev;
                while (window.pollEvent(ev)) {
                        if (ev.type == sf::Event::Closed) {
                                window.close();
                        }
                }
        }
}

Ram usage results after 30sec:
test1 - 65 Mb
test2 - 28 Mb

Pages: [1]