1 /*
2 DSFML - The Simple and Fast Multimedia Library for D
3 
4 Copyright (c) 2013 - 2015 Jeremy DeHaan (dehaan.jeremiah@gmail.com)
5 
6 This software is provided 'as-is', without any express or implied warranty.
7 In no event will the authors be held liable for any damages arising from the use of this software.
8 
9 Permission is granted to anyone to use this software for any purpose, including commercial applications,
10 and to alter it and redistribute it freely, subject to the following restrictions:
11 
12 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
13 If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
14 
15 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
16 
17 3. This notice may not be removed or altered from any source distribution
18 */
19 
20 ///A module containing the ContextSettings struct.
21 module dsfml.window.contextsettings;
22 
23 /**
24  *Structure defining the settings of the OpenGL context attached to a window.
25  *
26  *ContextSettings allows to define several advanced settings of the OpenGL context attached to a window.
27  *
28  *All these settings have no impact on the regular SFML rendering (graphics module) – except the 
29  *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.
30  *
31  *The depthBits and stencilBits members define the number of bits per pixel requested for the (respectively) depth and stencil buffers.
32  *
33  *antialiasingLevel represents the requested number of multisampling levels for anti-aliasing.
34  *
35  *majorVersion and minorVersion define the version of the OpenGL context that you want. Only versions
36  *greater or equal to 3.0 are relevant; versions lesser than 3.0 are all handled the same way (i.e. you 
37  *(can use any version < 3.0 if you don't want an OpenGL 3 context).
38  *
39  *Please note that these values are only a hint. No failure will be reported if one or more of these 
40  *values are not supported by the system; instead, SFML will try to find the closest valid match. 
41  *You can then retrieve the settings that the window actually used to create its context, with Window.getSettings(). 
42  */
43 struct ContextSettings
44 {
45 	///Bits of the depth buffer.
46 	uint depthBits = 0;
47 	///Bits of the stencil buffer.
48 	uint stencilBits = 0;
49 	///Level of antialiasing.
50 	uint antialiasingLevel = 0;
51 	///Level of antialiasing.
52 	uint majorVersion = 2;
53 	///Minor number of the context version to create.
54 	uint minorVersion = 0;
55 	
56 	static const(ContextSettings) Default;
57 }
58 //unittest?