nCine::DisplayMode class

Describes the pixel format and buffering properties of a display surface.

Immutable set of attributes requested for or reported by an OpenGL context: the per-channel color bit depths, the depth and stencil buffer sizes, and whether double buffering and vertical sync are enabled.

Public types

enum class DoubleBuffering { Disabled, Enabled }
Double buffering state.
enum class VSync { Disabled, Enabled }
Vertical sync state.

Constructors, destructors, conversion operators

DisplayMode()
DisplayMode(std::uint8_t redBits, std::uint8_t greenBits, std::uint8_t blueBits)
DisplayMode(std::uint8_t redBits, std::uint8_t greenBits, std::uint8_t blueBits, std::uint8_t alphaBits)
DisplayMode(std::uint8_t depthBits, std::uint8_t stencilBits, DoubleBuffering dbMode, VSync vsMode)
DisplayMode(std::uint8_t redBits, std::uint8_t greenBits, std::uint8_t blueBits, std::uint8_t alphaBits, std::uint8_t depthBits, std::uint8_t stencilBits, DoubleBuffering dbMode, VSync vsMode)

Public functions

auto redBits() const -> std::uint8_t
Returns the number of bits for the red channel.
auto greenBits() const -> std::uint8_t
Returns the number of bits for the green channel.
auto blueBits() const -> std::uint8_t
Returns the number of bits for the blue channel.
auto alphaBits() const -> std::uint8_t
Returns the number of bits for the alpha channel.
auto depthBits() const -> std::uint8_t
Returns the number of bits for the depth buffer.
auto stencilBits() const -> std::uint8_t
Returns the number of bits for the stencil buffer.
auto isDoubleBuffered() const -> bool
Returns whether the display is double buffered.
auto hasVSync() const -> bool
Returns whether the display has vertical sync enabled.