SFML - Simple and Fast Multimedia Library

SFML 3.0.0

- Main Page
- Topics
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
sf Namespace Reference

## Namespaces
namespace | Clipboard
| Give access to the system clipboard.
namespace | Glsl
| Namespace with GLSL types.
namespace | Joystick
| Give access to the real-time state of the joysticks.
namespace | Keyboard
| Give access to the real-time state of the keyboard.
namespace | Listener
| The audio listener is the point in the scene from where all the sounds are heard.
namespace | Literals
namespace | Mouse
| Give access to the real-time state of the mouse.
namespace | PlaybackDevice
namespace | Sensor
| Give access to the real-time state of the sensors.
namespace | Style
namespace | Touch
| Give access to the real-time state of the touches.
namespace | Vulkan
| Vulkan helper functions.

## Classes
class | Angle
| Represents an angle value. More...
class | AudioResource
| Base class for classes that require an audio device. More...
class | BlendMode
| Blending modes for drawing. More...
class | CircleShape
| Specialized shape representing a circle. More...
class | Clock
| Utility class that measures the elapsed time. More...
class | Color
| Utility class for manipulating RGBA colors. More...
class | Context
| Class holding a valid drawing context. More...
class | ContextSettings
| Structure defining the settings of the OpenGL context attached to a window. More...
class | ConvexShape
| Specialized shape representing a convex polygon. More...
class | Cursor
| Cursor defines the appearance of a system cursor. More...
class | Drawable
| Abstract base class for objects that can be drawn to a render target. More...
class | Event
| Defines a system event and its parameters. More...
class | Exception
| Library-specific exception type. More...
class | FileInputStream
| Implementation of input stream based on a file. More...
class | Font
| Class for loading and manipulating character fonts. More...
class | Ftp
| A FTP client. More...
class | GlResource
| Base class for classes that require an OpenGL context. More...
struct | Glyph
| Structure describing a glyph. More...
class | Http
| A HTTP client. More...
class | Image
| Class for loading, manipulating and saving images. More...
class | InputSoundFile
| Provide read access to sound files. More...
class | InputStream
| Abstract class for custom file input streams. More...
class | IpAddress
| Encapsulate an IPv4 network address. More...
class | MemoryInputStream
| Implementation of input stream based on a memory chunk. More...
class | Music
| Streamed music played from an audio file. More...
class | OutputSoundFile
| Provide write access to sound files. More...
class | Packet
| Utility class to build blocks of data to transfer over the network. More...
class | Rect
| Utility class for manipulating 2D axis aligned rectangles. More...
class | RectangleShape
| Specialized shape representing a rectangle. More...
class | RenderStates
| Define the states used for drawing to a `RenderTarget` More...
class | RenderTarget
| Base class for all render targets (window, texture, ...) More...
class | RenderTexture
| Target for off-screen 2D rendering into a texture. More...
class | RenderWindow
| Window that can serve as a target for 2D drawing. More...
class | Shader
| Shader class (vertex, geometry and fragment) More...
class | Shape
| Base class for textured shapes with outline. More...
class | Socket
| Base class for all the socket types. More...
class | SocketSelector
| Multiplexer that allows to read from multiple sockets. More...
class | Sound
| Regular sound that can be played in the audio environment. More...
class | SoundBuffer
| Storage for audio samples defining a sound. More...
class | SoundBufferRecorder
| Specialized SoundRecorder which stores the captured audio data into a sound buffer. More...
class | SoundFileFactory
| Manages and instantiates sound file readers and writers. More...
class | SoundFileReader
| Abstract base class for sound file decoding. More...
class | SoundFileWriter
| Abstract base class for sound file encoding. More...
class | SoundRecorder
| Abstract base class for capturing sound data. More...
class | SoundSource
| Base class defining a sound's properties. More...
class | SoundStream
| Abstract base class for streamed audio sources. More...
class | Sprite
| Drawable representation of a texture, with its own transformations, color, etc. More...
class | StencilMode
| Stencil modes for drawing. More...
struct | StencilValue
| Stencil value type (also used as a mask) More...
class | String
| Utility string class that automatically handles conversions between types and encodings. More...
struct | SuspendAwareClock
| Android, chrono-compatible, suspend-aware clock. More...
class | TcpListener
| Socket that listens to new TCP connections. More...
class | TcpSocket
| Specialized socket using the TCP protocol. More...
class | Text
| Graphical text that can be drawn to a render target. More...
class | Texture
| Image living on the graphics card that can be used for drawing. More...
class | Time
| Represents a time value. More...
class | Transform
| 3x3 transform matrix More...
class | Transformable
| Decomposed transform defined by a position, a rotation and a scale. More...
struct | U8StringCharTraits
| Character traits for `std::uint8_t` More...
class | UdpSocket
| Specialized socket using the UDP protocol. More...
class | Utf
| Utility class providing generic functions for UTF conversions. More...
class | Utf< 16 >
| Specialization of the Utf template for UTF-16.
class | Utf< 32 >
| Specialization of the Utf template for UTF-32.
class | Utf< 8 >
| Specialization of the Utf template for UTF-8.
class | Vector2
| Class template for manipulating 2-dimensional vectors. More...
class | Vector3
| Utility template class for manipulating 3-dimensional vectors. More...
struct | Vertex
| Point with color and texture coordinates. More...
class | VertexArray
| Set of one or more 2D primitives. More...
class | VertexBuffer
| Vertex buffer storage for one or more 2D primitives. More...
class | VideoMode
| VideoMode defines a video mode (size, bpp) More...
class | View
| 2D camera that defines what region is shown on screen More...
class | Window
| Window that serves as a target for OpenGL rendering. More...
class | WindowBase
| Window that serves as a base for other windows. More...

## Typedefs
using | IntRect = Rect<int>
using | FloatRect = Rect<float>
using | SocketHandle = int
using | U8String = std::basic_string<std::uint8_t, U8StringCharTraits>
| Portable replacement for `std::basic_string<std::uint8_t>`
using | Utf8 = Utf<8>
using | Utf16 = Utf<16>
using | Utf32 = Utf<32>
using | Vector2i = Vector2<int>
using | Vector2u = Vector2<unsigned int>
using | Vector2f = Vector2<float>
using | Vector3i = Vector3<int>
using | Vector3f = Vector3<float>
using | GlFunctionPointer = void (*)()
using | ContextDestroyCallback = void (*)(void*)
using | VulkanFunctionPointer = void (*)()
using | WindowHandle = "platform-specific"
| Low-level window handle type, specific to each platform.

## Enumerations
enum class | SoundChannel { SoundChannel::Unspecified , SoundChannel::Mono , SoundChannel::FrontLeft , SoundChannel::FrontRight , SoundChannel::FrontCenter , SoundChannel::FrontLeftOfCenter , SoundChannel::FrontRightOfCenter , SoundChannel::LowFrequencyEffects , SoundChannel::BackLeft , SoundChannel::BackRight , SoundChannel::BackCenter , SoundChannel::SideLeft , SoundChannel::SideRight , SoundChannel::TopCenter , SoundChannel::TopFrontLeft , SoundChannel::TopFrontRight , SoundChannel::TopFrontCenter , SoundChannel::TopBackLeft , SoundChannel::TopBackRight , SoundChannel::TopBackCenter }
| Types of sound channels that can be read/written from sound buffers/files. More...
enum class | CoordinateType { CoordinateType::Normalized , CoordinateType::Pixels }
| Types of texture coordinates that can be used for rendering. More...
enum class | PrimitiveType { PrimitiveType::Points , PrimitiveType::Lines , PrimitiveType::LineStrip , PrimitiveType::Triangles , PrimitiveType::TriangleStrip , PrimitiveType::TriangleFan }
| Types of primitives that a `sf::VertexArray` can render. More...
enum class | StencilComparison { Never , Less , LessEqual , Greater , GreaterEqual , Equal , NotEqual , Always }
| Enumeration of the stencil test comparisons that can be performed. More...
enum class | StencilUpdateOperation { Keep , Zero , Replace , Increment , Decrement , Invert }
| Enumeration of the stencil buffer update operations. More...
enum class | State { State::Windowed , State::Fullscreen }
| Enumeration of the window states. More...

## Functions
void | swap (Texture &left, Texture &right) noexcept
| Swap the contents of one texture with those of another.
void | swap (VertexBuffer &left, VertexBuffer &right) noexcept
| Swap the contents of one vertex buffer with those of another.
bool | operator== (IpAddress left, IpAddress right)
| Overload of `operator==` to compare two IP addresses.
bool | operator!= (IpAddress left, IpAddress right)
| Overload of `operator!=` to compare two IP addresses.
bool | operator< (IpAddress left, IpAddress right)
| Overload of `operator<` to compare two IP addresses.
bool | operator> (IpAddress left, IpAddress right)
| Overload of `operator>` to compare two IP addresses.
bool | operator<= (IpAddress left, IpAddress right)
| Overload of `operator<=` to compare two IP addresses.
bool | operator>= (IpAddress left, IpAddress right)
| Overload of `operator>=` to compare two IP addresses.
std::istream & | operator>> (std::istream &stream, std::optional< IpAddress > &address)
| Overload of `operator>>` to extract an IP address from an input stream.
std::ostream & | operator<< (std::ostream &stream, IpAddress address)
| Overload of `operator<<` to print an IP address to an output stream.
constexpr Angle | degrees (float angle)
| Construct an angle value from a number of degrees.
constexpr Angle | radians (float angle)
| Construct an angle value from a number of radians.
std::ostream & | err ()
| Standard stream used by SFML to output warnings and errors.
ANativeActivity * | getNativeActivity ()
| Return a pointer to the Android native activity.
void | sleep (Time duration)
| Make the current thread sleep for a given duration.
bool | operator== (const BlendMode &left, const BlendMode &right)
| Overload of the `operator==`
bool | operator!= (const BlendMode &left, const BlendMode &right)
| Overload of the `operator!=`
constexpr bool | operator== (Color left, Color right)
| Overload of the `operator==`
constexpr bool | operator!= (Color left, Color right)
| Overload of the `operator!=`
constexpr Color | operator+ (Color left, Color right)
| Overload of the binary `operator+`
constexpr Color | operator- (Color left, Color right)
| Overload of the binary `operator-`
constexpr Color | operator* (Color left, Color right)
| Overload of the binary `operator*`
constexpr Color & | operator+= (Color &left, Color right)
| Overload of the binary `operator+=`
constexpr Color & | operator-= (Color &left, Color right)
| Overload of the binary `operator-=`
constexpr Color & | operator*= (Color &left, Color right)
| Overload of the binary `operator*=`
template<typename T>
constexpr bool | operator== (const Rect< T > &lhs, const Rect< T > &rhs)
| Overload of binary `operator==`
template<typename T>
constexpr bool | operator!= (const Rect< T > &lhs, const Rect< T > &rhs)
| Overload of binary `operator!=`
bool | operator== (const StencilMode &left, const StencilMode &right)
| Overload of the `operator==`
bool | operator!= (const StencilMode &left, const StencilMode &right)
| Overload of the `operator!=`
constexpr Transform | operator* (const Transform &left, const Transform &right)
| Overload of binary `operator*` to combine two transforms.
constexpr Transform & | operator*= (Transform &left, const Transform &right)
| Overload of binary `operator*=` to combine two transforms.
constexpr Vector2f | operator* (const Transform &left, Vector2f right)
| Overload of binary `operator*` to transform a point.
constexpr bool | operator== (const Transform &left, const Transform &right)
| Overload of binary `operator==` to compare two transforms.
constexpr bool | operator!= (const Transform &left, const Transform &right)
| Overload of binary `operator!=` to compare two transforms.
constexpr bool | operator== (Angle left, Angle right)
| Overload of `operator==` to compare two angle values.
constexpr bool | operator!= (Angle left, Angle right)
| Overload of `operator!=` to compare two angle values.
constexpr bool | operator< (Angle left, Angle right)
| Overload of `operator<` to compare two angle values.
constexpr bool | operator> (Angle left, Angle right)
| Overload of `operator>` to compare two angle values.
constexpr bool | operator<= (Angle left, Angle right)
| Overload of `operator<=` to compare two angle values.
constexpr bool | operator>= (Angle left, Angle right)
| Overload of `operator>=` to compare two angle values.
constexpr Angle | operator- (Angle right)
| Overload of unary `operator-` to negate an angle value.
constexpr Angle | operator+ (Angle left, Angle right)
| Overload of binary `operator+` to add two angle values.
constexpr Angle & | operator+= (Angle &left, Angle right)
| Overload of binary `operator+=` to add/assign two angle values.
constexpr Angle | operator- (Angle left, Angle right)
| Overload of binary `operator-` to subtract two angle values.
constexpr Angle & | operator-= (Angle &left, Angle right)
| Overload of binary `operator-=` to subtract/assign two angle values.
constexpr Angle | operator* (Angle left, float right)
| Overload of binary `operator*` to scale an angle value.
constexpr Angle | operator* (float left, Angle right)
| Overload of binary `operator*` to scale an angle value.
constexpr Angle & | operator*= (Angle &left, float right)
| Overload of binary `operator*=` to scale/assign an angle value.
constexpr Angle | operator/ (Angle left, float right)
| Overload of binary `operator/` to scale an angle value.
constexpr Angle & | operator/= (Angle &left, float right)
| Overload of binary `operator/=` to scale/assign an angle value.
constexpr float | operator/ (Angle left, Angle right)
| Overload of binary `operator/` to compute the ratio of two angle values.
constexpr Angle | operator% (Angle left, Angle right)
| Overload of binary `operator%` to compute modulo of an angle value.
constexpr Angle & | operator%= (Angle &left, Angle right)
| Overload of binary `operator%=` to compute/assign remainder of an angle value.
constexpr Angle | operator""_deg (long double angle)
| User defined literal for angles in degrees, e.g. `10.5_deg`
constexpr Angle | operator""_deg (unsigned long long int angle)
| User defined literal for angles in degrees, e.g. `90_deg`
constexpr Angle | operator""_rad (long double angle)
| User defined literal for angles in radians, e.g. `0.1_rad`
constexpr Angle | operator""_rad (unsigned long long int angle)
| User defined literal for angles in radians, e.g. `2_rad`
bool | operator== (const String &left, const String &right)
| Overload of `operator==` to compare two UTF-32 strings.
bool | operator!= (const String &left, const String &right)
| Overload of `operator!=` to compare two UTF-32 strings.
bool | operator< (const String &left, const String &right)
| Overload of `operator<` to compare two UTF-32 strings.
bool | operator> (const String &left, const String &right)
| Overload of `operator>` to compare two UTF-32 strings.
bool | operator<= (const String &left, const String &right)
| Overload of `operator<=` to compare two UTF-32 strings.
bool | operator>= (const String &left, const String &right)
| Overload of `operator>=` to compare two UTF-32 strings.
String | operator+ (const String &left, const String &right)
| Overload of binary `operator+` to concatenate two strings.
constexpr Time | seconds (float amount)
| Construct a time value from a number of seconds.
constexpr Time | milliseconds (std::int32_t amount)
| Construct a time value from a number of milliseconds.
constexpr Time | microseconds (std::int64_t amount)
| Construct a time value from a number of microseconds.
constexpr bool | operator== (Time left, Time right)
| Overload of `operator==` to compare two time values.
constexpr bool | operator!= (Time left, Time right)
| Overload of `operator!=` to compare two time values.
constexpr bool | operator< (Time left, Time right)
| Overload of `operator<` to compare two time values.
constexpr bool | operator> (Time left, Time right)
| Overload of `operator>` to compare two time values.
constexpr bool | operator<= (Time left, Time right)
| Overload of `operator<=` to compare two time values.
constexpr bool | operator>= (Time left, Time right)
| Overload of `operator>=` to compare two time values.
constexpr Time | operator- (Time right)
| Overload of unary `operator-` to negate a time value.
constexpr Time | operator+ (Time left, Time right)
| Overload of binary `operator+` to add two time values.
constexpr Time & | operator+= (Time &left, Time right)
| Overload of binary `operator+=` to add/assign two time values.
constexpr Time | operator- (Time left, Time right)
| Overload of binary `operator-` to subtract two time values.
constexpr Time & | operator-= (Time &left, Time right)
| Overload of binary `operator-=` to subtract/assign two time values.
constexpr Time | operator* (Time left, float right)
| Overload of binary `operator*` to scale a time value.
constexpr Time | operator* (Time left, std::int64_t right)
| Overload of binary `operator*` to scale a time value.
constexpr Time | operator* (float left, Time right)
| Overload of binary `operator*` to scale a time value.
constexpr Time | operator* (std::int64_t left, Time right)
| Overload of binary `operator*` to scale a time value.
constexpr Time & | operator*= (Time &left, float right)
| Overload of binary `operator*=` to scale/assign a time value.
constexpr Time & | operator*= (Time &left, std::int64_t right)
| Overload of binary `operator*=` to scale/assign a time value.
constexpr Time | operator/ (Time left, float right)
| Overload of binary `operator/` to scale a time value.
constexpr Time | operator/ (Time left, std::int64_t right)
| Overload of binary `operator/` to scale a time value.
constexpr Time & | operator/= (Time &left, float right)
| Overload of binary `operator/=` to scale/assign a time value.
constexpr Time & | operator/= (Time &left, std::int64_t right)
| Overload of binary `operator/=` to scale/assign a time value.
constexpr float | operator/ (Time left, Time right)
| Overload of binary `operator/` to compute the ratio of two time values.
constexpr Time | operator% (Time left, Time right)
| Overload of binary `operator%` to compute remainder of a time value.
constexpr Time & | operator%= (Time &left, Time right)
| Overload of binary `operator%=` to compute/assign remainder of a time value.
template<typename T>
constexpr Vector2< T > | operator- (Vector2< T > right)
| Overload of unary `operator-`
template<typename T>
constexpr Vector2< T > & | operator+= (Vector2< T > &left, Vector2< T > right)
| Overload of binary `operator+=`
template<typename T>
constexpr Vector2< T > & | operator-= (Vector2< T > &left, Vector2< T > right)
| Overload of binary `operator-=`
template<typename T>
constexpr Vector2< T > | operator+ (Vector2< T > left, Vector2< T > right)
| Overload of binary `operator+`
template<typename T>
constexpr Vector2< T > | operator- (Vector2< T > left, Vector2< T > right)
| Overload of binary `operator-`
template<typename T>
constexpr Vector2< T > | operator* (Vector2< T > left, T right)
| Overload of binary `operator*`
template<typename T>
constexpr Vector2< T > | operator* (T left, Vector2< T > right)
| Overload of binary `operator*`
template<typename T>
constexpr Vector2< T > & | operator*= (Vector2< T > &left, T right)
| Overload of binary `operator*=`
template<typename T>
constexpr Vector2< T > | operator/ (Vector2< T > left, T right)
| Overload of binary `operator/`
template<typename T>
constexpr Vector2< T > & | operator/= (Vector2< T > &left, T right)
| Overload of binary `operator/=`
template<typename T>
constexpr bool | operator== (Vector2< T > left, Vector2< T > right)
| Overload of binary `operator==`
template<typename T>
constexpr bool | operator!= (Vector2< T > left, Vector2< T > right)
| Overload of binary `operator!=`
template<typename T>
constexpr Vector3< T > | operator- (const Vector3< T > &left)
| Overload of unary `operator-`
template<typename T>
constexpr Vector3< T > & | operator+= (Vector3< T > &left, const Vector3< T > &right)
| Overload of binary `operator+=`
template<typename T>
constexpr Vector3< T > & | operator-= (Vector3< T > &left, const Vector3< T > &right)
| Overload of binary `operator-=`
template<typename T>
constexpr Vector3< T > | operator+ (const Vector3< T > &left, const Vector3< T > &right)
| Overload of binary `operator+`
template<typename T>
constexpr Vector3< T > | operator- (const Vector3< T > &left, const Vector3< T > &right)
| Overload of binary `operator-`
template<typename T>
constexpr Vector3< T > | operator* (const Vector3< T > &left, T right)
| Overload of binary `operator*`
template<typename T>
constexpr Vector3< T > | operator* (T left, const Vector3< T > &right)
| Overload of binary `operator*`
template<typename T>
constexpr Vector3< T > & | operator*= (Vector3< T > &left, T right)
| Overload of binary `operator*=`
template<typename T>
constexpr Vector3< T > | operator/ (const Vector3< T > &left, T right)
| Overload of binary `operator/`
template<typename T>
constexpr Vector3< T > & | operator/= (Vector3< T > &left, T right)
| Overload of binary `operator/=`
template<typename T>
constexpr bool | operator== (const Vector3< T > &left, const Vector3< T > &right)
| Overload of binary `operator==`
template<typename T>
constexpr bool | operator!= (const Vector3< T > &left, const Vector3< T > &right)
| Overload of binary `operator!=`
bool | operator== (const VideoMode &left, const VideoMode &right)
| Overload of `operator==` to compare two video modes.
bool | operator!= (const VideoMode &left, const VideoMode &right)
| Overload of `operator!=` to compare two video modes.
bool | operator< (const VideoMode &left, const VideoMode &right)
| Overload of `operator<` to compare video modes.
bool | operator> (const VideoMode &left, const VideoMode &right)
| Overload of `operator>` to compare video modes.
bool | operator<= (const VideoMode &left, const VideoMode &right)
| Overload of `operator<=` to compare video modes.
bool | operator>= (const VideoMode &left, const VideoMode &right)
| Overload of `operator>=` to compare video modes.

## Variables
const BlendMode | BlendAlpha
| Blend source and dest according to dest alpha.
const BlendMode | BlendAdd
| Add source to dest.
const BlendMode | BlendMultiply
| Multiply source and dest.
const BlendMode | BlendMin
| Take minimum between source and dest.
const BlendMode | BlendMax
| Take maximum between source and dest.
const BlendMode | BlendNone
| Overwrite dest with source.

## Typedef Documentation

## ◆ ContextDestroyCallback

using sf::ContextDestroyCallback = void (*)(void*)

Definition at line 37 of file GlResource.hpp.

## ◆ FloatRect

using sf::FloatRect = Rect<float>

Definition at line 147 of file Rect.hpp.

## ◆ GlFunctionPointer

using sf::GlFunctionPointer = void (*)()

Definition at line 51 of file Context.hpp.

## ◆ IntRect

using sf::IntRect = Rect<int>

Definition at line 146 of file Rect.hpp.

## ◆ SocketHandle

using sf::SocketHandle = int

Definition at line 48 of file SocketHandle.hpp.

## ◆ U8String

using sf::U8String = std::basic_string<std::uint8_t, U8StringCharTraits>

Portable replacement for `std::basic_string<std::uint8_t>`

While all major C++ implementations happen to define this as of early 2024, this specialization is not strictly speaking standard C++. Thus we can't depend on its continued existence.

Definition at line 81 of file String.hpp.

## ◆ Utf16

using sf::Utf16 = Utf<16>

Definition at line 737 of file Utf.hpp.

## ◆ Utf32

using sf::Utf32 = Utf<32>

Definition at line 738 of file Utf.hpp.

## ◆ Utf8

using sf::Utf8 = Utf<8>

Definition at line 736 of file Utf.hpp.

## ◆ Vector2f

using sf::Vector2f = Vector2<float>

Definition at line 210 of file Vector2.hpp.

## ◆ Vector2i

using sf::Vector2i = Vector2<int>

Definition at line 208 of file Vector2.hpp.

## ◆ Vector2u

using sf::Vector2u = Vector2<unsigned int>

Definition at line 209 of file Vector2.hpp.

## ◆ Vector3f

using sf::Vector3f = Vector3<float>

Definition at line 306 of file Vector3.hpp.

## ◆ Vector3i

using sf::Vector3i = Vector3<int>

Definition at line 305 of file Vector3.hpp.

## ◆ VulkanFunctionPointer

using sf::VulkanFunctionPointer = void (*)()

Definition at line 57 of file Vulkan.hpp.

## Enumeration Type Documentation

## ◆ StencilComparison

enum class sf::StencilComparison
| strong

Enumeration of the stencil test comparisons that can be performed.

The comparisons are mapped directly to their OpenGL equivalents, specified by `glStencilFunc()`.

Enumerator
Never | The stencil test never passes.
Less | The stencil test passes if the new value is less than the value in the stencil buffer.
LessEqual | The stencil test passes if the new value is less than or equal to the value in the stencil buffer.
Greater | The stencil test passes if the new value is greater than the value in the stencil buffer.
GreaterEqual | The stencil test passes if the new value is greater than or equal to the value in the stencil buffer.
Equal | The stencil test passes if the new value is strictly equal to the value in the stencil buffer.
NotEqual | The stencil test passes if the new value is strictly unequal to the value in the stencil buffer.
Always | The stencil test always passes.

Definition at line 42 of file StencilMode.hpp.

## ◆ StencilUpdateOperation

enum class sf::StencilUpdateOperation
| strong

Enumeration of the stencil buffer update operations.

The update operations are mapped directly to their OpenGL equivalents, specified by `glStencilOp()`.

Enumerator
Keep | If the stencil test passes, the value in the stencil buffer is not modified.
Zero | If the stencil test passes, the value in the stencil buffer is set to zero.
Replace | If the stencil test passes, the value in the stencil buffer is set to the new value.
Increment | If the stencil test passes, the value in the stencil buffer is incremented and if required clamped.
Decrement | If the stencil test passes, the value in the stencil buffer is decremented and if required clamped.
Invert | If the stencil test passes, the value in the stencil buffer is bitwise inverted.

Definition at line 60 of file StencilMode.hpp.

## Function Documentation

## ◆ degrees()

Angle sf::degrees | ( | float | angle | ) |
| nodiscardconstexpr

Construct an angle value from a number of degrees.

Parameters

  angle | Number of degrees

Returns
  Angle value constructed from the number of degrees

See also
  `radians`

## ◆ operator!=() [1/12]

bool sf::operator!= | ( | IpAddress | left,
|  | IpAddress | right )
| nodiscard

Overload of `operator!=` to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  `true` if both addresses are different

## ◆ operator<() [1/5]

bool sf::operator< | ( | IpAddress | left,
|  | IpAddress | right )
| nodiscard

Overload of `operator<` to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  `true` if `left` is lesser than `right`

## ◆ operator<<()

std::ostream & sf::operator<< | ( | std::ostream & | stream,
|  | IpAddress | address )

Overload of `operator<<` to print an IP address to an output stream.

Parameters

  stream | Output stream
  address | IP address to print

Returns
  Reference to the output stream

## ◆ operator<=() [1/5]

bool sf::operator<= | ( | IpAddress | left,
|  | IpAddress | right )
| nodiscard

Overload of `operator<=` to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  `true` if left is lesser or equal than right

## ◆ operator==() [1/12]

bool sf::operator== | ( | IpAddress | left,
|  | IpAddress | right )
| nodiscard

Overload of `operator==` to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  `true` if both addresses are equal

## ◆ operator>() [1/5]

bool sf::operator> | ( | IpAddress | left,
|  | IpAddress | right )
| nodiscard

Overload of `operator>` to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  `true` if `left` is greater than `right`

## ◆ operator>=() [1/5]

bool sf::operator>= | ( | IpAddress | left,
|  | IpAddress | right )
| nodiscard

Overload of `operator>=` to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  `true` if `left` is greater or equal than `right`

## ◆ operator>>()

std::istream & sf::operator>> | ( | std::istream & | stream,
|  | std::optional< IpAddress > & | address )

Overload of `operator>>` to extract an IP address from an input stream.

Parameters

  stream | Input stream
  address | IP address to extract

Returns
  Reference to the input stream

## ◆ radians()

Angle sf::radians | ( | float | angle | ) |
| nodiscardconstexpr

Construct an angle value from a number of radians.

Parameters

  angle | Number of radians

Returns
  Angle value constructed from the number of radians

See also
  `degrees`

## ◆ swap() [1/2]

void sf::swap | ( | Texture & | left,
|  | Texture & | right )
| noexcept

Swap the contents of one texture with those of another.

Parameters

  left | First instance to swap
  right | Second instance to swap

## ◆ swap() [2/2]

void sf::swap | ( | VertexBuffer & | left,
|  | VertexBuffer & | right )
| noexcept

Swap the contents of one vertex buffer with those of another.

Parameters

  left | First instance to swap
  right | Second instance to swap

## Variable Documentation

## ◆ BlendAdd

const BlendMode sf::BlendAdd
| extern

Add source to dest.

## ◆ BlendAlpha

const BlendMode sf::BlendAlpha
| extern

Blend source and dest according to dest alpha.

## ◆ BlendMax

const BlendMode sf::BlendMax
| extern

Take maximum between source and dest.

## ◆ BlendMin

const BlendMode sf::BlendMin
| extern

Take minimum between source and dest.

## ◆ BlendMultiply

const BlendMode sf::BlendMultiply
| extern

Multiply source and dest.

## ◆ BlendNone

const BlendMode sf::BlendNone
| extern

Overwrite dest with source.