Commit graph

12 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
e0e2d9fe80 project: Improve Linux support (#27 and #13)
While Linux was not an original goal of the project, it should still be supported out of the box. Therefore a number of changes are contained in this changeset:

- All C++ .h files were renamed to .hpp.
- All C includes (<....h>) were replaced with C++ includes (<c...>) and missing includes were added.
- std::memset and std::memcpy was replaced with memset and memcpy.
- All anonymous structs were removed where necessary.
- `extern "C"` was removed where it wasn't needed.
- #pragma warning was placed behind an #ifdef _MSC_VER
- The macros for `min`, `max` and `clamp` were removed as they were not used.
- `-fpedantic` was added to the GCC flags for bitmask support.
- `gs::rendertarget_op` is now declared before use.
- std::exception(const char*) was replaced with std::runtime_error(const char*).
- Added aligned_alloc and aligned_free macros for GCC and MSVC support.
- Replaced use of `sprintf_s` with `snprintf`.
- Placed additional guards around windows only code.

Additonally some changes were made that do not affect Linux:
- `NOMINMAX` and `NOINOUT` were removed.

Fixes: #27
Fixes: #13
2019-01-14 22:31:35 +01:00
Michael Fabian 'Xaymar' Dirks
b87ca70796 project: Formatting 2018-11-07 15:24:25 +01:00
Michael Fabian 'Xaymar' Dirks
391fca7497 gs-effect: Formatting 2018-09-28 14:18:09 +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
2adfa5765c gs: Rename to snake_case instead of PascalCase
This should prevent mishaps with upper/lowercase typos and fits in better with the C++ standard code, which is also in snake_case.
2018-03-20 12:44:02 +01:00
Michael Fabian 'Xaymar' Dirks
107103001b gs-effect: Add HasParameter and fix Set*Array
HasParameter can be used to safely check if a parameter exists and such should be preferred over try-catch blocks. Additionally, SetFloat2, SetFloat3, SetFloat4, SetFloatArray, SetInteger2, SetInteger3, SetInteger4 and SetIntegerArray should no longer cause rendering issues due to invalid buffer sizes.
2018-01-25 09:12:47 +01:00
Michael Fabian 'Xaymar' Dirks
a307283349 gs-effect: Allow directly assigning OBS GS objects 2018-01-19 20:46:21 +01:00
Michael Fabian 'Xaymar' Dirks
102e4e5eeb gs-effect: Implement method to override the next sampler 2018-01-19 05:10:10 +01:00
Michael Fabian 'Xaymar' Dirks
71900e6752 gs-effect: Allow retrieving effect parameter name 2017-11-05 21:50:38 +01:00
Michael Fabian 'Xaymar' Dirks
4b364865a1 gs-effect: Allow empty effect and check errorMessage validity 2017-11-05 21:31:05 +01:00
Michael Fabian 'Xaymar' Dirks
a9b13787be gs-effect: Provide parameter count and index access 2017-11-05 16:47:36 +01:00
Michael Fabian Dirks
eb1612c6ee gs: Wrap OBS Graphics Subsystem in proper C++ classes 2017-09-18 00:05:28 +02:00