Commit Graph

11 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks 528d36a13f util-math: Fix compile error and add get_power_of_two_* 2018-09-28 14:23:26 +02:00
Michael Fabian 'Xaymar' Dirks 1923a724d7 util-math: Formatting and is_power_of_two templates 2018-09-28 14:17:43 +02:00
Michael Fabian 'Xaymar' Dirks 0cd4520774 util-math: Bilateral Blur 2018-04-28 12:45:23 +02:00
Michael Fabian 'Xaymar' Dirks ec19f44f96 project: Don't prefix includes with "libobs/" 2018-04-23 17:53:27 +02:00
Michael Fabian 'Xaymar' Dirks 304db23335 util-math: Add SizeFromString method
Converts a String to an std::pair of int64_t (long long), which contain the size or 0 if none could be parsed. Any delimiter except digits(0-9), a minus sign(-) or a plus sign(+) between width and height are allowed. If a plus or minus sign is used as a delimiter, it must immediately be followed by the second size number. This allows for formats such as: 100x100, 100:100, 100p100, 100@100, 100+100 and so on, but not formats such as 100+:100, 100ThisIsSomeReall+yLongText100, etc.

The parameter 'allowSquare' also determines what to do when the height parameter is not found. A value of true will have the function return <width,width> instead of <width,0>.
2018-03-05 16:36:20 +01:00
Michael Fabian 'Xaymar' Dirks f721ad0f19 util-math: Fix standalone compilation issues
All libobs files must be loaded with libobs/... instead of directly.
2018-01-08 16:47:39 +01:00
Michael Fabian 'Xaymar' Dirks 08c088ce5a util-math, util-memory: Formatting 2018-01-08 16:14:54 +01:00
Michael Fabian 'Xaymar' Dirks a3d859fb4f util-math: Implement aligned vec3 and vec4 versions
A bug in Visual C++ 2013 32-bit & 2015 32-bit causes the C++ compiler to incorrectly align the vec3 and vec4 structs to 8-byte instead of 16-byte, resulting in a crash if the target PC supports SSE. Visual Studio 2017 and 64-bit builds are not affected.

Related: #9
2018-01-08 15:29:42 +01:00
Michael Fabian 'Xaymar' Dirks 0d794254be util-math: Fix MSVC 2013 errors 2017-12-14 03:00:31 +01:00
Michael Fabian 'Xaymar' Dirks 408481c22d util-math: Functions to calculate nearest power of two values 2017-12-14 01:36:07 +01:00
Michael Fabian 'Xaymar' Dirks d78d3024cc util-math: Add commonly used mathematical functions 2017-12-14 00:28:35 +01:00