Magnum::Platform::GlfwApplication::GLConfiguration class

OpenGL context configuration.

Contents

Double-buffered RGBA window with depth and stencil buffers.

Public types

enum class Flag: Int { NoError = GLFW_CONTEXT_NO_ERROR, Debug = GLFW_OPENGL_DEBUG_CONTEXT, Stereo = GLFW_STEREO }
Context flag.
using Flags = Containers::EnumSet<Flag>
Context flags.

Public functions

auto flags() const -> Flags
Context flags.
auto setFlags(Flags flags) -> GLConfiguration&
Set context flags.
auto version() const -> GL::Version
Context version.
auto setVersion(GL::Version version) -> GLConfiguration&
Set context version.
auto sampleCount() const -> Int
Sample count.
auto setSampleCount(Int count) -> GLConfiguration&
Set sample count.
auto isSRGBCapable() const -> bool
sRGB-capable default framebuffer
auto setSRGBCapable(bool enabled) -> GLConfiguration&
Set sRGB-capable default framebuffer.

Enum documentation

enum class Magnum::Platform::GlfwApplication::GLConfiguration::Flag: Int

Context flag.

Enumerators
NoError

Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause undefined behavior.

Debug

Debug context

Stereo

Stereo rendering

Typedef documentation

typedef Containers::EnumSet<Flag> Magnum::Platform::GlfwApplication::GLConfiguration::Flags

Context flags.

Function documentation

GLConfiguration& Magnum::Platform::GlfwApplication::GLConfiguration::setFlags(Flags flags)

Set context flags.

Returns Reference to self (for method chaining)

Default is no flag.

GLConfiguration& Magnum::Platform::GlfwApplication::GLConfiguration::setVersion(GL::Version version)

Set context version.

If requesting version greater or equal to OpenGL 3.1, core profile is used. The created context will then have any version which is backwards-compatible with requested one. Default is GL::Version::None, i.e. any provided version is used.

GLConfiguration& Magnum::Platform::GlfwApplication::GLConfiguration::setSampleCount(Int count)

Set sample count.

Returns Reference to self (for method chaining)

Default is 0, thus no multisampling. The actual sample count is ignored, GLFW either enables it or disables. See also GL::Renderer::Feature::Multisampling.

GLConfiguration& Magnum::Platform::GlfwApplication::GLConfiguration::setSRGBCapable(bool enabled)

Set sRGB-capable default framebuffer.

Returns Reference to self (for method chaining)