zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Configurator_Video.cpp
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2  * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3  *
4  * zenilib is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * zenilib is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include <zeni_rest.h>
19 
20 #include <Zeni/Define.h>
21 
22 #if defined(_DEBUG) && defined(_WINDOWS)
23 #define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
24 #define new DEBUG_NEW
25 #endif
26 
27 namespace Zeni {
28 
29  Configurator_Video::Check_State::Accept_Button::Accept_Button(Check_State &check_video, const std::pair<Point2f, Point2f> &virtual_screen)
30  : Text_Button(Point2f(virtual_screen.second.x - 100.0f, virtual_screen.second.y - 42.0f),
31  Point2f(virtual_screen.second),
32  "system_36_x600",
33  "Accept"),
34  m_check_video(check_video)
35  {
36  }
37 
38  void Configurator_Video::Check_State::Accept_Button::on_accept() {
39  m_check_video.m_code = CODE_SAVE;
40  get_Game().pop_state();
41  }
42 
43  Configurator_Video::Check_State::Check_State()
44  : Widget_Gamestate(std::make_pair(Point2f(), Point2f(600.0f * get_Window().get_width() / get_Window().get_height(), 600.0f))),
45 #ifdef _WINDOWS
46 #pragma warning( push )
47 #pragma warning( disable : 4355 )
48 #endif
49  m_accept_button(*this, get_virtual_window()),
50 #ifdef _WINDOWS
51 #pragma warning( pop )
52 #endif
53  m_seconds_remaining(ZENI_REVERT_TIMEOUT),
54  m_text(Point2f(), get_virtual_window().second, "system_36_x600",
55  "Click 'Accept' to save current rendering options.\n"
56  "Hit 'Escape' to reject current rendering options.\n"
57  "Current rendering options will be rejected in "
58 #define xstr(s) str(s)
59 #define str(s) #s
61 #undef str
62 #undef xstr
63  " seconds.",
64  get_Colors()["default_button_bg_normal"], false),
65  m_code(CODE_REVERT)
66  {
67  m_widgets.lend_Widget(m_accept_button);
68  m_widgets.lend_Widget(m_text);
69 
70  m_text.give_BG_Renderer(new Widget_Renderer_Color(get_Colors()["default_button_text_normal"]));
71  }
72 
73  void Configurator_Video::Check_State::on_pop() {
75 
76  if(m_code == CODE_SAVE)
77  Video::save();
78  else if(m_code == CODE_REVERT) {
80  Video::revert();
81  }
82  }
83 
84  void Configurator_Video::Check_State::on_key(const SDL_KeyboardEvent &event) {
85  if(event.keysym.sym == SDLK_ESCAPE) {
86  if(event.state == SDL_PRESSED)
87  get_Game().pop_state();
88  }
89  else
91  }
92 
93 #if SDL_VERSION_ATLEAST(2,0,0)
94  void Configurator_Video::Check_State::on_window_event(const SDL_WindowEvent &event) {
95  if(event.event != SDL_WINDOWEVENT_RESIZED)
96  return;
97 
98  Video::change_resolution(Point2i(event.data1, event.data2));
99 #else
100  void Configurator_Video::Check_State::on_video_resize(const SDL_ResizeEvent &event) {
101  Video::change_resolution(Point2i(event.w, event.h));
102 #endif
103 
104  m_code = CODE_IGNORE;
105 
106  get_Game().pop_state();
107  get_Game().push_state(new Check_State);
108  }
109 
110  void Configurator_Video::Check_State::perform_logic() {
112 
113  const Time current_time;
114  const float seconds_remaining_f = ZENI_REVERT_TIMEOUT - current_time.get_seconds_since(m_start_time);
115 
116  if(seconds_remaining_f < 0.0f) {
117  get_Game().pop_state();
118  return;
119  }
120 
121  const int seconds_remaining(int(seconds_remaining_f + 0.999f));
122 
123  if(seconds_remaining < m_seconds_remaining) {
124  m_seconds_remaining = seconds_remaining;
125 
126  m_text.set_text(
127  "Click 'Accept' to save current rendering options.\n"
128  "Hit 'Escape' to reject current rendering options.\n"
129  "Current rendering options will be rejected in " +
130  itoa(m_seconds_remaining) +
131  " seconds.");
132  }
133  }
134 
135  Configurator_Video::Check_Box_Element::Check_Box_Element(const XML_Element &element,
136  const bool &checked,
137  const Point2f &upper_left,
138  const float &height)
139  : Check_Box(upper_left,
140  Point2f(upper_left.x + height, upper_left.y + height),
141  checked),
142  m_element(element)
143  {
144  m_element.set_bool(checked);
145  }
146 
147  void Configurator_Video::Check_Box_Element::on_accept() {
149  m_element.set_bool(is_checked());
150  }
151 
152  void Configurator_Video::Check_Box_Element::render_impl() const {
154 
155  Font &font = get_Fonts()["system_36_500x600"];
156 
157  font.render_text(" " + m_element.value(),
158  Point2f(get_lower_right().x,
159  0.5f * (get_lower_right().y + get_upper_left().y - font.get_text_height())),
160  get_Colors()["default_button_bg_normal"]);
161  }
162 
163  Configurator_Video::Slider_Element::Slider_Element(const XML_Element &element,
164  const int &value,
165  const std::pair<int, int> &range,
166  const Point2f &upper_left,
167  const Point2f &lower_right)
168  : Slider_Int(range,
169  Point2f(0.9f * upper_left.x + 0.1f * lower_right.x, 0.5f * (upper_left.y + lower_right.y)),
170  Point2f(0.1f * upper_left.x + 0.9f * lower_right.x, 0.5f * (upper_left.y + lower_right.y)),
171  0.2f * (lower_right.x - upper_left.x)),
172  m_element(element),
173  m_text_coord(lower_right.x,
174  0.5f * (lower_right.y + upper_left.y))
175  {
176  set_value(value);
177  m_element.set_int(value);
178  }
179 
180  void Configurator_Video::Slider_Element::on_accept() {
182  m_element.set_int(get_value());
183  }
184 
185  void Configurator_Video::Slider_Element::render_impl() const {
187 
188  Font &font = get_Fonts()["system_36_500x600"];
189 
190  font.render_text(" " + m_element.value() + " (" + itoa(get_value()) + ")",
191  Point2f(m_text_coord.x, m_text_coord.y - 0.5f * font.get_text_height()),
192  get_Colors()["default_button_bg_normal"]);
193  }
194 
195  Configurator_Video::Text_Element::Text_Element(const XML_Element &element,
196  const String &text,
197  const Point2f &upper_left,
198  const Point2f &lower_right)
199  : Text_Box(upper_left,
200  Point2f(lower_right.x /*- get_Fonts()["system_36_500x600"].get_text_width(" " + element.value())*/, lower_right.y),
201  "system_36_500x600",
202  text,
203  get_Colors()["default_button_text_normal"],
204  true,
205  ZENI_CENTER),
206  m_element(element)
207  {
208  m_element.set_string(text);
209  }
210 
211  void Configurator_Video::Text_Element::on_change() {
213  m_element.set_string(get_text());
214  }
215 
216  void Configurator_Video::Text_Element::render_impl() const {
218 
219  //Font &font = get_Fonts()["system_36_500x600"];
220 
221  //font.render_text(" " + m_element.value(),
222  // Point2f(get_lower_right().x,
223  // 0.5f * (get_lower_right().y + get_upper_left().y - font.get_text_height())),
224  // get_Colors()["default_button_bg_normal"]);
225  }
226 
227  Configurator_Video::Selector_Element::Selector_Element(const XML_Element &element,
228  const Point2f &upper_left,
229  const Point2f &lower_right,
230  const Point2f &expanded_upper_left,
231  const Point2f &expanded_lower_right)
232  : Selector(upper_left, lower_right, expanded_upper_left, expanded_lower_right, "system_36_500x600"),
233  m_element(element)
234  {
235  }
236 
237  void Configurator_Video::Selector_Element::add_entry(const String &option, const String &save_as) {
238  add_option(option);
239  m_save_as[option] = save_as;
240  }
241 
242  size_t Configurator_Video::Selector_Element::num_entries() const {
243  return m_save_as.size();
244  }
245 
246  void Configurator_Video::Selector_Element::on_accept(const String &option) {
247  Selector::on_accept(option);
248  m_element.set_string(m_save_as[option]);
249  }
250 
251  Configurator_Video::Resolution_Element::Resolution_Element(const XML_Element &element,
252  const Point2f &upper_left,
253  const Point2f &lower_right,
254  const Point2f &expanded_upper_left,
255  const Point2f &expanded_lower_right)
256  : Selector(upper_left, lower_right, expanded_upper_left, expanded_lower_right, "system_36_500x600"),
257  m_element(element)
258  {
259  const std::vector<Point2i> &resolutions = get_Window().get_resolutions();
260 
261  for(std::vector<Point2i>::const_iterator it = resolutions.begin(); it != resolutions.end(); ++it)
262  add_option(itoa(it->x) + "x" + itoa(it->y));
263 
264  // This will be the fall back if the other options do not exist
265  select_option(itoa(resolutions.begin()->x) + 'x' + itoa(resolutions.begin()->y));
266 
267  // Prefer 640x480
268  select_option("640x480");
269 
270  // Try the set the current resolution as the selection option
271  select_option(itoa(get_Window().get_width()) + 'x' + itoa(get_Window().get_height()));
272  }
273 
274  void Configurator_Video::Resolution_Element::on_accept(const String &option) {
275  Selector::on_accept(option);
276 
277  const size_t x = option.find('x');
278 
279  m_element["Width"].set_string(option.substr(0, x));
280  m_element["Height"].set_string(option.substr(x + 1));
281  }
282 
283  Configurator_Video::Custom_Resolution_Box::Custom_Resolution_Box(Configurator_Video &configurator,
284  const bool &checked,
285  const Point2f &upper_left,
286  const float &height)
287  : Check_Box(upper_left,
288  Point2f(upper_left.x + height, upper_left.y + height),
289  checked),
290  m_configurator(configurator)
291  {
292  }
293 
294  void Configurator_Video::Custom_Resolution_Box::apply() {
295  if(is_checked()) {
296  m_configurator.m_widgets.unlend_Widget(m_configurator.resolution);
297  m_configurator.m_widgets.lend_Widget(m_configurator.custom_width);
298  m_configurator.m_widgets.lend_Widget(m_configurator.custom_height);
299 
300  m_configurator.custom_width.on_change();
301  m_configurator.custom_height.on_change();
302  }
303  else {
304  m_configurator.m_widgets.unlend_Widget(m_configurator.custom_width);
305  m_configurator.m_widgets.unlend_Widget(m_configurator.custom_height);
306  m_configurator.m_widgets.lend_Widget(m_configurator.resolution);
307 
308  m_configurator.resolution.on_accept(m_configurator.resolution.get_selected());
309  }
310  }
311 
312  void Configurator_Video::Custom_Resolution_Box::on_accept() {
314  apply();
315  }
316 
317  void Configurator_Video::Custom_Resolution_Box::render_impl() const {
319 
320  Font &font = get_Fonts()["system_36_500x600"];
321 
322  font.render_text(" Custom",
323  Point2f(get_lower_right().x,
324  0.5f * (get_lower_right().y + get_upper_left().y - font.get_text_height())),
325  get_Colors()["default_button_bg_normal"]);
326  }
327 
328  Configurator_Video::Apply_Button::Apply_Button(XML_Document &file,
329  const Point2f &upper_left,
330  const Point2f &lower_right)
331  : Text_Button(upper_left, lower_right, "system_36_500x600", "Apply"),
332  m_file(&file)
333  {
334  }
335 
336  void Configurator_Video::Apply_Button::on_accept() {
337  XML_Element_c zenilib = (*m_file)["Zenilib"];
338  XML_Element_c textures = zenilib["Textures"];
339  XML_Element_c video = zenilib["Video"];
340  const String api = video["API"].to_string();
341 
343 #ifndef DISABLE_GL_SHADER
344  api == "OpenGL Shader" ? Video::ZENI_VIDEO_GL_SHADER :
345 #endif
346 #ifndef DISABLE_DX9
347  api == "Direct3D 9" || api == "DX9" ? Video::ZENI_VIDEO_DX9 :
348 #endif
349 #ifndef DISABLE_GL_FIXED
350  api == "OpenGL Fixed" || api == "OpenGL" ? Video::ZENI_VIDEO_GL_FIXED :
351 #endif
353  Window::preinit_resolution(Point2i(video["Resolution"]["Width"].to_int(),
354  video["Resolution"]["Height"].to_int()));
355  Window::preinit_full_screen(video["Full_Screen"].to_bool());
356  Video::preinit_multisampling(video["Multisampling"].to_int());
357  Video::preinit_vertical_sync(video["Vertical_Sync"].to_bool());
358 
359  Textures::set_texturing_mode(textures["Anisotropy"].to_int(),
360  textures["Bilinear_Filtering"].to_bool(),
361  textures["Mipmapping"].to_bool());
362 
363  Video::destroy();
364  Window::destroy();
365 
366  get_Window();
367  get_Video();
371 
372  get_Game().pop_state();
373  get_Game().push_state(new Check_State);
374  }
375 
376  Configurator_Video::Cancel_Button::Cancel_Button(const Point2f &upper_left,
377  const Point2f &lower_right)
378  : Text_Button(upper_left, lower_right, "system_36_500x600", "Cancel")
379  {
380  }
381 
382  void Configurator_Video::Cancel_Button::on_accept() {
383  get_Game().pop_state();
384  }
385 
387 #ifdef _WINDOWS
388 #pragma warning( push )
389 #pragma warning( disable : 4355 )
390 #endif
391  : Widget_Gamestate(std::make_pair(Point2f(0.0f, 0.0f), Point2f(500.0f, 600.0f))),
392  m_file(get_File_Ops().get_appdata_path() + "config/zenilib.xml", "config/zenilib.xml"),
393  m_zenilib(m_file["Zenilib"]),
394 
395  anisotropy(m_zenilib["Textures"]["Anisotropy"], Textures::get_anisotropic_filtering(), std::make_pair(0, get_Video().get_maximum_anisotropy()), Point2f(52.0f, 10.0f + 2 * 42.0f), Point2f(52.0f + 100.0f, 10.0f + 2 * 42.0f + 36.0f)),
396  bilinear_filtering(m_zenilib["Textures"]["Bilinear_Filtering"], Textures::get_bilinear_filtering(), Point2f(52.0f, 10.0f + 3 * 42.0f), 36.0f),
397  mipmapping(m_zenilib["Textures"]["Mipmapping"], Textures::get_mipmapping(), Point2f(52.0f, 10.0f + 4 * 42.0f), 36.0f),
398 
399  api(m_zenilib["Video"]["API"], Point2f(52.0f, 10.0f + 6 * 42.0f), Point2f(375.0f, 10.0f + 6 * 42.0f + 36.0f), Point2f(10.0f, 0.0f), Point2f(395.0f, 600.0f)),
400  full_screen(m_zenilib["Video"]["Full_Screen"], Window::is_full_screen(), Point2f(52.0f, 10.0f + 7 * 42.0f), 36.0f),
401  multisampling(m_zenilib["Video"]["Multisampling"], Video::get_multisampling(), std::make_pair(0, 16), Point2f(52.0f, 10.0f + 8 * 42.0f), Point2f(52.0f + 100.0f, 10.0f + 8 * 42.0f + 36.0f)),
402 
403  resolution(m_zenilib["Video"]["Resolution"], Point2f(52.0f, 10.0f + 9 * 42.0f), Point2f(52.0f + 200.0f, 10.0f + 9 * 42.0f + 36.0f), Point2f(52.0f + 20.0f, 0.0f), Point2f(52.0f + 220.0f, 600.0f)),
404  custom_resolution(*this, true, Point2f(294.0, 10.0f + 9 * 42.0f), 36.0f),
405  custom_width(m_zenilib["Video"]["Resolution"]["Width"], itoa(Window::get_width()), Point2f(52.0f, 10.0f + 9 * 42.0f), Point2f(52.0f + 80.0f, 10.0f + 9 * 42.0f + 36.0f)),
406  custom_height(m_zenilib["Video"]["Resolution"]["Height"], itoa(Window::get_height()), Point2f(52.0f + 120.0f, 10.0f + 9 * 42.0f), Point2f(52.0f + 200.0f, 10.0f + 9 * 42.0f + 36.0f)),
407 
408  vertical_sync(m_zenilib["Video"]["Vertical_Sync"], Video::get_vertical_sync(), Point2f(52.0f, 10.0f + 10 * 42.0f), 36.0f),
409 
410  save(m_file, Point2f(10.0f, 590.0f - 42.0f - 36.0f), Point2f(10.0f + 200.0f, 590.0f - 42.0f)),
411  cancel(Point2f(10.0f, 590.0f - 36.0f), Point2f(10.0f + 200.0f, 590.0f)),
412  m_prev_title(get_Window().get_title())
413 #ifdef _WINDOWS
414 #pragma warning( pop )
415 #endif
416  {
419 #if !defined(DISABLE_DX9)
420  api.add_entry("Direct3D 9", "Direct3D 9");
421  if(dynamic_cast<Video_DX9 *>(&get_Video()))
422  api.select_option("Direct3D 9");
423 #endif
424 #if !defined(DISABLE_GL_FIXED)
425  api.add_entry("OpenGL Fixed", "OpenGL Fixed");
426  if(dynamic_cast<Video_GL_Fixed *>(&get_Video()))
427  api.select_option("OpenGL Fixed");
428 #endif
429 #if !defined(DISABLE_GL_SHADER)
430  api.add_entry("OpenGL Shader", "OpenGL Shader");
431  if(dynamic_cast<Video_GL_Shader *>(&get_Video()))
432  api.select_option("OpenGL Shader");
433 #endif
434  if(api.num_entries() < 2)
435  api.set_editable(false);
436 
440 
441  m_widgets.lend_Widget(api);
444 
446  {
447  const String selected = resolution.get_selected();
448  const size_t x = selected.find('x');
449  if(selected.substr(0, x) == custom_width.get_text() &&
450  selected.substr(x + 1) == custom_height.get_text())
451  {
452  custom_resolution.set_checked(false);
453  }
454  else {
455  custom_resolution.set_checked(true);
456  }
457  custom_resolution.apply();
458  }
459 
461 
464 
467  get_Window().set_title("zenilib Configurator");
468  }
469 
471  get_Window().set_title(m_prev_title);
472  }
473 
474  void Configurator_Video::on_push() {
476 
477  get_Video().set_clear_Color(get_Colors()["configurator_bg"]);
478  }
479 
480  void Configurator_Video::on_key(const SDL_KeyboardEvent &event) {
481  if(event.keysym.sym == SDLK_ESCAPE) {
482  if(event.state == SDL_PRESSED)
483  get_Game().pop_state();
484  }
485  else
487  }
488 
489  void Configurator_Video::render() {
491 
492  Font &font = get_Fonts()["system_36_500x600"];
493  const Color color = get_Colors()["system_font"];
494 
495  font.render_text("zenilib Renderer Configuration:", Point2f(10.0f, 10.0f), color);
496  font.render_text("Textures:", Point2f(10.0f, 10.0f + 1 * 42.0f), color);
497  font.render_text("Video:", Point2f(10.0f, 10.0f + 5 * 42.0f), color);
498  font.render_text("x", Point2f(52.0f + 100.0f, 10.0f + 9 * 42.0f), color, ZENI_CENTER);
499 
500  m_widgets.render();
501  }
502 
503 }
void on_key(const SDL_KeyboardEvent &event)
Override this input callback in your Gamestates. See SDL documentation for details.
static const int & get_width()
Get the size of the window.
Definition: Window.hxx:33
GLdouble s
Definition: glew.h:1376
Check_Box_Element bilinear_filtering
const bool & fix_aspect_ratio() const
GLuint color
Definition: glew.h:7185
virtual void on_accept()
Called when the cursor is released inside the button.
Definition: Widget.cpp:315
size_t find(const String &str, size_t pos=0) const
Definition: String.cpp:480
Colors & get_Colors()
Get access to the singleton.
Definition: Colors.cpp:51
GLclampf f
Definition: glew.h:3390
static void change_resolution(const Point2i &resolution)
Definition: Video.cpp:366
static void set_title(const String &title)
Set the window title.
Definition: Window.cpp:445
virtual void set_clear_Color(const Color &color)=0
Set the blank background color.
Definition: Video.cpp:214
Gamestate with some helpers for dealing with Widgets.
static bool revert()
Restore previously saved options; Returns true if successful.
Definition: Video.cpp:457
void perform_logic()
Then perform logic. Called by Game as part of the main gameloop.
const std::pair< Point2f, Point2f > & get_virtual_window() const
void render() const
Definition: Widget.hxx:111
EGLSurface EGLint x
Definition: eglext.h:293
Custom_Resolution_Box custom_resolution
static int get_anisotropic_filtering()
Check the current level of anisotropy.
Definition: Textures.hxx:40
void give_BG_Renderer(Widget_Render_Function *const &renderer)
Set the current Widget_Render_Function, giving the Widget ownership.
Definition: Widget.hxx:612
Check_Box_Element full_screen
Gamestate pop_state()
Pop a Gamestate off the stack. Pop the current Gamestate with caution. All members will instantly bec...
Definition: Game.cpp:90
static void reformat_all()
Reformat all Text_Box instances.
Definition: Widget.cpp:1397
FILE * file
Definition: visualinfo.c:88
EGLSurface EGLint EGLint EGLint EGLint height
Definition: eglext.h:293
virtual void render_impl() const
Definition: Widget.cpp:1076
static void preinit_full_screen(const bool &full_screen=false)
Set the rendering window to be full screen at launch.
Definition: Window.cpp:405
Game & get_Game()
Get access to the singleton.
Definition: Game.cpp:58
String substr(size_t pos=0, size_t n=npos) const
Definition: String.cpp:510
GLenum GLint * range
Definition: glew.h:3391
static void preinit_resolution(const Point2i &resolution=Point2i(800, 600))
Set the rendering window to have a given resolution.
Definition: Window.cpp:401
GLuint GLenum option
Definition: glew.h:3180
Keyboard button event structure (event.key.*)
Definition: SDL_events.h:176
static void preinit_multisampling(const int &multisampling=0)
Set a multisampling value.
Definition: Video.cpp:328
#define true
Definition: ftrandom.c:49
#define pop
Definition: SDL_qsort.c:125
void push_state(const Gamestate &state)
Push a new Gamestate onto the stack.
Definition: Game.cpp:76
void set_2d()
Set the default 2D view filling the entire display area.
Definition: Video.hxx:93
String itoa(const int &number)
static const bool & is_full_screen()
Determine whether the window is windowed or full screen.
Definition: Window.hxx:54
#define xstr(s)
static int get_multisampling()
Get the current level of multisampling.
Definition: Video.hxx:57
void on_pop()
Called when the Gamestate is popped off the stack in Game.
void lend_Widget(Widget &widget)
Definition: Widget.hxx:658
SDL_Keysym keysym
Definition: SDL_events.h:185
static void save(const bool &backup=true)
Save options.
Definition: Video.cpp:389
static void preinit_vertical_sync(const bool &vertical_sync=false)
Set vertical_sync to true.
Definition: Video.cpp:332
virtual void on_change()
Definition: Widget.cpp:1073
Check_Box_Element vertical_sync
Textures & get_Textures()
Get access to the singleton.
Definition: Textures.cpp:64
Window state change event data (event.window.*)
Definition: SDL_events.h:160
virtual void render_impl() const
Definition: Widget.cpp:40
Window & get_Window()
Get access to the singleton.
Definition: Window.cpp:392
const std::vector< Point2i > & get_resolutions() const
Get available full screen resolutions.
Definition: Window.hxx:66
EGLSurface EGLint EGLint y
Definition: eglext.h:293
void on_push()
Called when the Gamestate is pushed onto the stack in Game.
void unlose_resources()
If resources have been lost, then reload them.
Definition: Database.hxx:415
EGLSurface EGLint void ** value
Definition: eglext.h:301
virtual void on_accept(const String &option)
Definition: Widget.cpp:712
static const int & get_height()
Get the height of the window.
Definition: Window.hxx:37
GLsizei const GLuint * textures
Definition: glew.h:4751
SDL_Keycode sym
Definition: SDL_keyboard.h:50
virtual void on_accept()
Definition: Widget.cpp:444
static bool get_vertical_sync()
Determine whether vertical sync is enabled.
Definition: Video.hxx:53
static void set_texturing_mode(const int &anisotropic_filtering_, const bool &bilinear_filtering_, const bool &mipmapping_)
Check to see if Textures is set to use lazy loading if possible.
Definition: Textures.cpp:104
Fonts & get_Fonts()
Get access to the singleton.
Definition: Fonts.cpp:60
#define str(s)
Video & get_Video()
Get access to the singleton.
Definition: Video.cpp:149
static void preinit_video_mode(const VIDEO_MODE &vm=ZENI_VIDEO_ANY)
Set which rendering engine to use.
Definition: Video.cpp:324
static bool get_mipmapping()
Check if mipmapping is in use.
Definition: Textures.hxx:32
#define SDL_PRESSED
Definition: SDL_events.h:50
File_Ops & get_File_Ops()
Get access to the singleton.
Definition: File_Ops.cpp:118
#define ZENI_REVERT_TIMEOUT
Definition: Define.h:82
static bool get_bilinear_filtering()
Check if bilinear filtering is in use.
Definition: Textures.hxx:28
A 2D Point represented with floats.
Definition: Coordinate.h:98
Resolution_Element resolution
Check_Box_Element mipmapping
#define false
Definition: ftrandom.c:50
cl_event event
Definition: glew.h:3556