Commit Graph

191 Commits

Author SHA1 Message Date
Chris Thrasher
0812054e02 Remove trailing whitespace 2022-06-25 21:32:55 +02:00
Chris Thrasher
757cb36d30 Use <random> header 2022-06-16 23:56:39 +02:00
Chris Thrasher
65fef85b30 Simplify how examples are built
CMake doesn't require absolute paths so we can safely remove
SRCROOT and let implicit relative pathing achieve the same result
with less work on our part.
2022-06-16 23:56:39 +02:00
Chris Thrasher
539483d329 Use std::array 2022-06-16 23:56:39 +02:00
Chris Thrasher
dbac180db5 Limit the scope of event object 2022-06-08 13:16:40 +02:00
Chris Thrasher
88515b2fca Add polar coordinates constructor for sf::Vector2<T> 2022-05-17 20:30:02 +02:00
Chris Thrasher
0785093ebc Use sf::Vector2<T> for numeric parameter pairs 2022-05-17 08:33:11 +02:00
Lukas Dürrenberger
9a6142bd22 Merge branch '2.6.x' 2022-04-27 08:12:25 +02:00
Radek Dutkiewicz
b6ca47e128 DRM Implementation
Ported sfml-pi DRM/KMS backend written by @mickelson 
Port co-authored by @substring

Co-authored-by: Andrew Mickelson <andrew.mickelson@gmail.com>
Co-authored-by: Gil Delescluse <frog2wah@gmail.com>
2022-04-26 07:44:14 +02:00
Chris Thrasher
a302a9829e Ensure files end with newline character 2022-04-12 08:13:48 +02:00
kimci86
e0d03ec6a8 Fix success condition for sending end-of-stream packet in voip example 2022-04-06 12:01:42 +02:00
Chris Thrasher
c5f3aeca72 Use std::quoted 2022-04-05 22:45:22 +02:00
Chris Thrasher
33a7c4d2a8 Clean up filesystem path usage in examples 2022-03-15 15:21:45 +01:00
Chris Thrasher
5f2c7bb898 Use std::filesystem::path 2022-02-17 00:40:29 +00:00
Vittorio Romeo
a3b27b4a6d Use pre-increment when post-increment is not necessary 2022-02-17 00:39:35 +00:00
Vittorio Romeo
b069f88127 Avoid overuse of 'std::endl' 2022-02-16 16:28:39 +00:00
Jan Haller
eb321b3040 Update year to 2022 (master branch) 2022-02-16 13:52:31 +00:00
binary1248
359fe9088c Fixed warnings reported by LGTM and Coverity Scan. 2022-02-16 08:26:17 +01:00
Jan Haller
9d28bf7eb2 Update year to 2022 (amended) 2022-02-12 19:29:09 +01:00
Chris Thrasher
28f273b9c9 Add sf::Angle
Similar to sf::Time, sf::Angle provides a typesafe API for working
with angles and provides named functions for converting to and from
degrees and radians.
2022-02-08 22:52:37 +00:00
Chris Thrasher
4586db91a9 Add SFML:: namespace to targets
This removes the sfml- prefixed targets from the export set. The sfml-
prefixed targets are still available within the build tree but not to
downstream users thus making this an API breaking change when compared
to the 2.x releases. To keep things consistent, usage of the sfml-
targets were replaced with their namespaced counterparts.

This has a number of benefits:

  1. It's more idiomatic. Modern CMake libraries are expected to
     have namespaced targets.

  2. Namespaced targets are less likely to collide with user-defined
     targets. No one will accidentally define a SFML:: target.

  3. If a namespaced target is not found by CMake, configuration
     will immediately stop.
2022-01-11 22:27:39 +01:00
Chris Thrasher
70e0ad28d4 Only build Cocoa example when using Xcode 2022-01-08 19:46:19 +01:00
Chris Thrasher
79c2aadbcc Remove redundant 4-param sf::Rect<T> constructor 2022-01-06 20:04:03 +01:00
Chris Thrasher
7d47e740bb Only build Cocoa example when using Xcode 2022-01-04 23:05:23 +01:00
Vittorio Romeo
7364d5b578 Fix broken OpenGL example 2021-12-21 20:41:44 +01:00
Vittorio Romeo
f6de7eca40 Use smart pointers to manage memory 2021-12-21 19:54:25 +01:00
Vittorio Romeo
257c78f07a Don't use 'sf::err' in public example code 2021-12-20 15:06:27 +01:00
Lukas Dürrenberger
3cd45a283b Merge branch '2.6.x' into feature/backmerge 2021-12-20 13:44:56 +01:00
Pawel Paruzel
c824d3d57a Fix all macOS clang warnings
Co-authored-by: binary1248 <binary1248@hotmail.com>
2021-12-20 00:10:55 +01:00
Vittorio Romeo
18bb892625 Improve compilation times by removing some includes and avoiding heavy dependencies 2021-12-19 18:13:07 +01:00
Vittorio Romeo
3c7fba0f96 Reduce compile-time impact of 'windows.h' 2021-12-16 22:39:07 +01:00
kimci86
fbc866c5c9 Fix regression in shader example 2021-12-15 15:27:37 +01:00
Pawel Paruzel
96a4262fb9 Update Android example build to C++17 2021-12-15 12:52:27 +01:00
Vittorio Romeo
e9e353a7b2 Remove redundant APIs taking '(x, y)' in favour of ones taking 'sf::Vector' 2021-12-15 11:22:46 +01:00
Vittorio Romeo
bb854fa739 Strategic use of '[[nodiscard]]' in 'Audio' module 2021-12-14 15:19:37 +01:00
Vittorio Romeo
b33f4bb205 Replace SFML multithreading primitives with standard C++ ones 2021-12-14 01:07:29 +01:00
Vittorio Romeo
363e964acc Strategic use of '[[nodiscard]]' in 'Graphics' module 2021-12-10 01:27:05 +00:00
Vittorio Romeo
7343b112fc Strategic use of '[[nodiscard]]' in 'Network' module 2021-12-09 22:34:57 +00:00
Vittorio Romeo
3579ecbdb0 Strategic use of '[[nodiscard]]' in 'Window' module 2021-12-09 19:53:54 +00:00
Lukas Dürrenberger
cd517ba267 Merge branch '2.6.x' into feature/backmerge 2021-12-09 14:36:55 +01:00
Vittorio Romeo
756a399909 Remove deprecated 'Keyboard::Key' enumerators and adjust usages 2021-12-09 13:12:03 +00:00
Vittorio Romeo
d12a2cd319 Use 'override' whenever possible instead of 'virtual' 2021-12-09 09:07:03 +01:00
Vittorio Romeo
87e84bc9e5 Minor modernization changes: 'nullptr', range-based 'for' loops, ... 2021-12-08 21:41:20 +00:00
Vittorio Romeo
2839f6b4d2 Use 'auto' where no information is lost 2021-12-08 19:14:31 +00:00
Vittorio Romeo
9a0cc4b7dc Use alias declarations instead of 'typedef' 2021-12-08 17:58:13 +00:00
Anton Vasiliev
f03a415121 Use std::vector.data() where appropriate 2021-12-08 16:26:03 +00:00
Vittorio Romeo
8be8a76cba Use 'auto', range-'for', and structured bindings to improve some loops 2021-12-08 13:05:52 +01:00
lieff
e458f4651e Add MP3 decoding support using 'minimp3'
Co-authored-by: Lukas Dürrenberger <eXpl0it3r@my-gate.net>
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
2021-12-08 08:19:08 +01:00
Anton Vasiliev
ce5d410c74 Fix exception on Vulkan example shutdown
This change fixes exception on Vulkan example shutdown when drawing
to window after it was closed.
2021-12-08 01:06:37 +00:00
Anton Vasiliev
b9da3b879c Fix possible exception on Vulkan example startup
This change fixes possible exception on Vulkan example startup when
validationLayers.size()) is zero.
2021-12-08 01:06:37 +00:00