rolmodl
C++ API for the Simple Directmedia Library 2 (SDL2)
Public Member Functions | Static Public Member Functions | List of all members
rolmodl::ren::Flags Struct Reference

Renderer configuration (flags) container. More...

#include <Ren.hpp>

Public Member Functions

constexpr Flags () noexcept
 Create a configuration corresponding to a default renderer.
 
constexpr bool isSoftware () const noexcept
 Test whether this configuration corresponds to a software renderer. The SDL flag equivalent is SDL_RENDERER_SOFTWARE.
 
constexpr bool isAccelerated () const noexcept
 Test whether this configuration corresponds to an accelerated renderer. The SDL flag equivalent is SDL_RENDERER_ACCELERATED.
 
constexpr bool isVsync () const noexcept
 Test whether this configuration corresponds to a VSync renderer. The SDL flag equivalent is SDL_RENDERER_PRESENTVSYNC.
 
constexpr bool isToTexture () const noexcept
 Test whether this configuration corresponds to a renderer capable of rendering to texture. The SDL flag equivalent is SDL_RENDERER_TARGETTEXTURE.
 
constexpr Flags withSoftware () const noexcept
 Create a version of this configuration that corresponds to a software renderer. The SDL flag equivalent is SDL_RENDERER_SOFTWARE.
 
constexpr Flags withAccelerated () const noexcept
 Create a version of this configuration that corresponds to an accelerated renderer. The SDL flag equivalent is SDL_RENDERER_ACCELERATED.
 
constexpr Flags withVsync () const noexcept
 Create a version of this configuration that corresponds to a VSync renderer. The SDL flag equivalent is SDL_RENDERER_PRESENTVSYNC.
 
constexpr Flags withToTexture () const noexcept
 Create a version of this configuration that corresponds to a renderer capable of rendering to texture. The SDL flag equivalent is SDL_RENDERER_TARGETTEXTURE.
 
constexpr Flags withoutSoftware () const noexcept
 Create a version of this configuration that corresponds to a renderer that is not software. The SDL flag equivalent is ~SDL_RENDERER_SOFTWARE.
 
constexpr Flags withoutAccelerated () const noexcept
 Create a version of this configuration that corresponds to a renderer that is not accelerated. The SDL flag equivalent is ~SDL_RENDERER_ACCELERATED.
 
constexpr Flags withoutVsync () const noexcept
 Create a version of this configuration that corresponds to a renderer that is not VSync. The SDL flag equivalent is ~SDL_RENDERER_PRESENTVSYNC.
 
constexpr Flags withoutToTexture () const noexcept
 Create a version of this configuration that corresponds to a renderer that is not capable of rendering to texture. The SDL flag equivalent is ~SDL_RENDERER_TARGETTEXTURE.
 
constexpr uint32_t raw () const noexcept
 Return the underlying bitfield representation of this configuration.
 

Static Public Member Functions

constexpr static Flags unsafeFromRaw (const uint32_t data) noexcept
 Create a configuration representing the bitfield data. Unsafe because data is not verified as representing a valid configuration.
 

Detailed Description

Renderer configuration (flags) container.

Todo:
todo: some flags might be mutually exclusive fixme: how does CreateSoftwareRenderer relate
See also
https://wiki.libsdl.org/SDL_RendererFlags

Definition at line 136 of file Ren.hpp.


The documentation for this struct was generated from the following file: