Game Development Reference
In-Depth Information
Setting
Description
Common value ranges
The field allows us to suggest the number of
bits per pixel for the depth buffer
depthBits
[0, 8, 16, 24, 32]
The field allows us to suggest the number of
bits per pixel for the stencil buffer
[0, 8]
stencilBits
The field allows us to suggest the major version
of OpenGL
majorVersion
[1…4]
The field allows us to suggest the minor version
of OpenGL
[1…5]
minorVersion
antialiasingLevel The field allows us to suggest the multisampling
level
[0…16]. Typically a power of 2 yields the
best results—1, 2, 4, 8, 16
These values do not force SFML to use them, and no exception will be thrown if we try to
use them on hardware that does not support them. SFML chooses the closest (and prob-
ably best) option that is supported on the system. We can check which options were selec-
ted by getting the ContextSettings from the window:
Here is an example result:
Once we get everything set up, we can create our familiar loop:
Search WWH ::




Custom Search