Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
monopoly::presentation Namespace Reference

Classes

class  FrameTelemetry
 
struct  Options
 

Enumerations

enum class  WindowMode { Windowed , BorderlessFullscreen , ExclusiveFullscreen }
 
enum class  PresentMode { Vsync , Mailbox , Immediate }
 

Functions

std::expected< Options, std::string > parseArguments (std::span< const std::string_view > arguments)
 
SDL_WindowFlags windowFlags (const Options &options) noexcept
 
std::pair< int, int > initialWindowSize (const Options &options) noexcept
 
std::expected< void, std::string > configureWindow (SDL_Window *window, const Options &options)
 
std::expected< void, std::string > toggleBorderlessFullscreen (SDL_Window *window, const Options &options)
 
SDL_GPUPresentMode toSDLPresentMode (PresentMode mode) noexcept
 
std::string_view presentModeName (PresentMode mode) noexcept
 
std::string_view windowModeName (WindowMode mode) noexcept
 
std::expected< SDL_GPUPresentMode, std::string > configureSwapchain (SDL_GPUDevice *device, SDL_Window *window, PresentMode requested)
 

Enumeration Type Documentation

◆ PresentMode

Enumerator
Vsync 
Mailbox 
Immediate 

Definition at line 21 of file Presentation.hpp.

◆ WindowMode

Enumerator
Windowed 
BorderlessFullscreen 
ExclusiveFullscreen 

Definition at line 14 of file Presentation.hpp.

Function Documentation

◆ configureSwapchain()

std::expected< SDL_GPUPresentMode, std::string > monopoly::presentation::configureSwapchain ( SDL_GPUDevice *  device,
SDL_Window *  window,
PresentMode  requested 
)

Definition at line 279 of file Presentation.cpp.

◆ configureWindow()

std::expected< void, std::string > monopoly::presentation::configureWindow ( SDL_Window *  window,
const Options &  options 
)

Definition at line 149 of file Presentation.cpp.

◆ initialWindowSize()

std::pair< int, int > monopoly::presentation::initialWindowSize ( const Options &  options)
noexcept

Definition at line 141 of file Presentation.cpp.

◆ parseArguments()

std::expected< Options, std::string > monopoly::presentation::parseArguments ( std::span< const std::string_view >  arguments)

Definition at line 54 of file Presentation.cpp.

◆ presentModeName()

std::string_view monopoly::presentation::presentModeName ( PresentMode  mode)
noexcept

Definition at line 254 of file Presentation.cpp.

◆ toggleBorderlessFullscreen()

std::expected< void, std::string > monopoly::presentation::toggleBorderlessFullscreen ( SDL_Window *  window,
const Options &  options 
)

Definition at line 208 of file Presentation.cpp.

◆ toSDLPresentMode()

SDL_GPUPresentMode monopoly::presentation::toSDLPresentMode ( PresentMode  mode)
noexcept

Definition at line 239 of file Presentation.cpp.

◆ windowFlags()

SDL_WindowFlags monopoly::presentation::windowFlags ( const Options &  options)
noexcept

Definition at line 128 of file Presentation.cpp.

◆ windowModeName()

std::string_view monopoly::presentation::windowModeName ( WindowMode  mode)
noexcept

Definition at line 266 of file Presentation.cpp.