Commit Graph

11 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks 71b223dcb5 gs-effect: Add ::create for shared_ptr and remove default constructor 2019-08-04 23:19:38 +02:00
Michael Fabian 'Xaymar' Dirks 0c447f4055 gs-effect: Use std::shared_ptr and track effect lifetime
This fixes the case where the effect vanishes, but we still hold an invalid pointer to a parameter of that effect. With the new code, the effect will not vanish as long as an effect pointer exists.

However, all effects must be created either through std::shared_ptr or std::make_shared. If they were not made through one of those means, the code will crash on the ->shared_from_this() call.
2019-08-04 23:12:30 +02:00
Michael Fabian 'Xaymar' Dirks 0e350415b3 project: Apply new coding guidelines 2019-08-04 16:20:26 +02:00
Michael Fabian 'Xaymar' Dirks e887a53463 filter-sdf-effects: Fix a crash due to failed rendering
For whatever reason, the initial render target render fails when an async source is being used.
2019-07-27 19:57:49 +02:00
Michael Fabian 'Xaymar' Dirks ccc4c6ea22 filter-sdf-effects: Fix and improve effect rendering
Fixes the bug that rendering an outline would remove all other effects not directly under the outline, while also improving the rendering speed drastically by only initializing and clearing the rendertarget once instead of for each effect.
2019-05-28 02:51:27 +02:00
Michael Fabian 'Xaymar' Dirks f8e685cf42 project: Apply clang-format manually again 2019-04-19 20:40:07 +02:00
Michael Fabian 'Xaymar' Dirks be4d42312d project: Fix all remaining portability issues
Clang on Windows and Clang on Linux behave differently, and of course GCC on Windows (MinGW) and GCC on Linux do too. This is the point where using either compiler on either platform should successfully compile the project without any issues.

Clang and GCC have a ton of warnings however, which definitely need to be fixed in the near future. Some of them are great warnings, like old C style casts, others are non-sense like suggest brackets.

Fixes #47
Fixes #60
2019-04-19 14:18:29 +02:00
Michael Fabian 'Xaymar' Dirks aac52f736d project: Clang support
Lots and lots of errors and warnings fixed with this single commit, in the name of clang support.

Related #60, #47.
2019-04-19 09:42:15 +02:00
Michael Fabian 'Xaymar' Dirks c59ec2511b filter-sdf-effects: Refactor to include Glow and Stroke (#2, #4)
This refactors the SDF Effects to use a normal blend function instead of doing the blend in the effect itself, improving quality and reducing problematic sampling issues. In addition to this, the effect files have been cleaned up slightly and renamed to their proper names. Glow and Stroke are now supported, which solves both #2 and #4 in one go.

The caching optimization has also now been implemented, reducing the number of renders for this filter to 1 for each tick.
2019-04-14 14:19:59 +02:00
Michael Fabian 'Xaymar' Dirks c0f951d855 project: Fix various warnings 2019-03-01 11:33:19 +01:00
Michael Fabian 'Xaymar' Dirks 3bf1333c84 project: Restructure of the file system
The number of files in the source directory was a little bit much and just made file naming more complex than it had to be. Therefore all files were moved into subdirectories where it matters.

Filters now reside in source/filters/, Sources in source/sources/, OBS Wrappers in obs/, OBS GS Wrappers in obs/gs/, Transitions will reside in source/transitions, Graphics Helpers will be in gfx/.
2019-02-11 04:03:57 +01:00
Renamed from source/filter-sdf-effects.cpp (Browse further)