ClanLib  2.3.7
opengl_window_description.h
Go to the documentation of this file.
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2011 The ClanLib Team
4 **
5 ** This software is provided 'as-is', without any express or implied
6 ** warranty. In no event will the authors be held liable for any damages
7 ** arising from the use of this software.
8 **
9 ** Permission is granted to anyone to use this software for any purpose,
10 ** including commercial applications, and to alter it and redistribute it
11 ** freely, subject to the following restrictions:
12 **
13 ** 1. The origin of this software must not be misrepresented; you must not
14 ** claim that you wrote the original software. If you use this software
15 ** in a product, an acknowledgment in the product documentation would be
16 ** appreciated but is not required.
17 ** 2. Altered source versions must be plainly marked as such, and must not be
18 ** misrepresented as being the original software.
19 ** 3. This notice may not be removed or altered from any source distribution.
20 **
21 ** Note: Some of the libraries ClanLib may link to may have additional
22 ** requirements or restrictions.
23 **
24 ** File Author(s):
25 **
26 ** Magnus Norddahl
27 */
28 
31 
32 #pragma once
33 
34 #include "api_gl.h"
35 #include "../Core/System/sharedptr.h"
36 #include "../Display/Window/display_window_description.h"
37 
38 class CL_OpenGLWindowDescription_Impl;
39 
53 {
56 public:
59 
65 
66  virtual ~CL_OpenGLWindowDescription();
67 
71 public:
73 
74  bool get_doublebuffer() const;
75 
77 
78  bool get_stereo() const;
79 
81 
83  int get_buffer_size() const;
84 
86  int get_red_size() const;
87 
89  int get_green_size() const;
90 
92  int get_blue_size() const;
93 
95  int get_alpha_size() const;
96 
98  int get_multisampling() const;
99 
101  int get_version_major() const;
102 
104  int get_version_minor() const;
105 
107  bool get_allow_lower_versions() const;
108 
110  bool get_debug() const;
111 
113  bool get_forward_compatible() const;
114 
116  bool get_core_profile() const;
117 
119  bool get_compatibility_profile() const;
120 
122  int get_layer_plane() const;
123 
127 public:
129 
130  void set_doublebuffer(bool value);
131 
133 
134  void set_stereo(bool value);
135 
137 
139  void set_buffer_size(int value);
140 
142 
144  void set_red_size(int value);
145 
147 
149  void set_green_size(int value);
150 
152 
154  void set_blue_size(int value);
155 
157 
159  void set_alpha_size(int value);
160 
162  void set_multisampling(int value);
163 
171  void set_version(int major, int minor, bool allow_lower_versions);
172 
180  void set_debug(bool enable);
181 
190  void set_forward_compatible(bool enable);
191 
197  void set_core_profile(bool enable);
198 
204  void set_compatibility_profile(bool enable);
205 
211  void set_layer_plane(int value);
212 
216 private:
217  CL_SharedPtr<CL_OpenGLWindowDescription_Impl> impl_gl;
219 };
220