Class SFML::ContextSettings
In: window/main.cpp
Parent: Object

ContextSettings allows to define several advanced settings of the OpenGL context attached to a window.

All these settings have no impact on the regular SFML rendering (graphics module) — except the anti-aliasing level, so you may need to use this structure only if you‘re using SFML as a windowing system for custom OpenGL rendering.

The DepthBits and StencilBits members define the number of bits per pixel requested for the (respectively) depth and stencil buffers.

AntialiasingLevel represents the requested number of multisampling levels for anti-aliasing.

MajorVersion and MinorVersion define the version of the OpenGL context that you want. Only versions greater or equal to 3.0 are relevant; versions lesser than 3.0 are all handled the same way (i.e. you can use any version < 3.0 if you don‘t want an OpenGL 3 context).

Please note that these values are only a hint. No failure will be reported if one or more of these values are not supported by the system; instead, SFML will try to find the closest valid match. You can then retrieve the settings that the window actually used to create its context, with Window::GetSettings().

Methods

Public Class methods

Public Instance methods

antialiasing()

Alias for antialiasingLevel

antialiasing=(p1)

Alias for antialiasingLevel=

antialiasing_level()

Alias for antialiasingLevel

antialiasing_level=(p1)

Alias for antialiasingLevel=

depth()

Alias for depthBits

depth=(p1)

Alias for depthBits=

depth_bits()

Alias for depthBits

depth_bits=(p1)

Alias for depthBits=

major()

Alias for majorVersion

major=(p1)

Alias for majorVersion=

Major number of the context version to create

Major number of the context version to create

major_version()

Alias for majorVersion

major_version=(p1)

Alias for majorVersion=

minor()

Alias for minorVersion

minor=(p1)

Alias for minorVersion=

Minor number of the context version to create

Minor number of the context version to create

minor_version()

Alias for minorVersion

minor_version=(p1)

Alias for minorVersion=

stencil()

Alias for stencilBits

stencil=(p1)

Alias for stencilBits=

stencil_bits()

Alias for stencilBits

stencil_bits=(p1)

Alias for stencilBits=

[Validate]