Commit Graph

22 Commits

Author SHA1 Message Date
Chris Thrasher
056f66a2b8 Replace sf::Int32 with std::int32_t 2022-09-12 15:36:55 -06:00
Chris Thrasher
82b48a7520 Use std::size_t 2022-09-07 22:23:22 +02:00
Chris Thrasher
4f52793f7d Run clang-format 2022-07-11 20:04:56 +02:00
metaquarx
88e9f82bee Add '.clang-format' file, CI integration, and formatting exceptions
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2022-07-11 20:04:56 +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
0785093ebc Use sf::Vector2<T> for numeric parameter pairs 2022-05-17 08:33:11 +02:00
Chris Thrasher
a302a9829e Ensure files end with newline character 2022-04-12 08:13:48 +02:00
Vittorio Romeo
a3b27b4a6d Use pre-increment when post-increment is not necessary 2022-02-17 00:39:35 +00: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
Vittorio Romeo
257c78f07a Don't use 'sf::err' in public example code 2021-12-20 15:06:27 +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
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
Vittorio Romeo
6cf124db66 Fix remaining warnings
- Fixes in examples
- Fixes across all the modules
2021-11-30 11:25:58 +01:00
Lukas Dürrenberger
bc628c6b28 Fix warnings in examples
- Convert where necessary
- Adjust type where reasonable
- Use SYSTEM headers for gl.h, stb* and vulkan
2021-11-30 11:25:58 +01:00
binary1248
6272f853c1 Add support for creating Vulkan window surfaces. 2019-10-16 21:48:24 +02:00