Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
gui
SettingsWindow.hh
1
#ifndef VTESTBED_GUI_SETTINGSWINDOW_HH
2
#define VTESTBED_GUI_SETTINGSWINDOW_HH
3
4
#include <vtestbed/config/opencl.hh>
5
#include <vtestbed/config/openmp.hh>
6
#include <vtestbed/core/testbed.hh>
7
#include <vtestbed/gui/ApplicationBase.hh>
8
#include <vtestbed/gui/Window.hh>
9
#include <vtestbed/gui/imgui.hh>
10
#include <vtestbed/ini/ini_settings.hh>
11
12
#if defined(VTB_WITH_OPENCL)
13
#include <openclx/device>
14
#include <openclx/platform>
15
#include <vtestbed/opencl/opencl.hh>
16
#endif
17
18
namespace
vtb
{
19
20
namespace
gui {
21
22
template
<
class
T>
23
class
SettingsWindow
:
public
Window
{
24
25
private
:
26
using
settings_type
=
vtb::ini::Ini_settings
;
27
#if defined(VTB_WITH_OPENCL)
28
using
context_type =
vtb::opencl::Context
;
29
#endif
30
using
testbed_type
=
vtb::core::Testbed<T,3>
;
31
32
private
:
33
std::string
_current_stylename;
34
ApplicationBase
* _application =
nullptr
;
35
std::vector<std::string>
_stylenames;
36
std::string
_new_stylename;
37
float
_size_font;
38
std::string
_framework;
39
int
_num_threads = 1;
40
bool
_dynamic_teams =
false
;
41
std::string
_locale{
"C"
};
42
bool
_multisampling;
43
int
_samplecount;
44
float
_near;
45
float
_far;
46
#if defined(VTB_WITH_OPENCL)
47
std::vector<clx::platform>
_platforms;
48
clx::platform _platform;
49
std::vector<clx::device>
_devices;
50
std::string
_platform_suffix;
51
std::string
_current_device;
52
std::string
_flags;
53
#endif
54
55
public
:
56
57
SettingsWindow
(
ApplicationBase
* app);
58
59
inline
settings_type
& settings() {
return
this->_application->settings(); }
60
inline
settings_type
* colors() {
return
this->_application->colors_ptr(); }
61
62
void
draw();
63
void
language();
64
void
style();
65
void
parallel_computing();
66
void
opengl();
67
void
style_list();
68
69
#if defined(VTB_WITH_OPENCL)
70
inline
clx::platform platform() {
return
this->_platform; }
71
#endif
72
73
private
:
74
75
void
set_framework(
std::string
rhs);
76
void
set_platform(
size_t
i);
77
void
set_opencl_context();
78
79
};
80
81
}
82
83
}
84
85
#endif // vim:filetype=cpp
vtb::gui::SettingsWindow
Definition:
SettingsWindow.hh:23
vtb::ini::Ini_settings
Definition:
ini_settings.hh:14
vtb::gui::ApplicationBase
Definition:
ApplicationBase.hh:21
std::string
vtb
Main namespace.
Definition:
convert.hh:9
std::vector< std::string >
vtb::core::Testbed< T, 3 >
vtb::gui::Window
Definition:
Window.hh:12
vtb::opencl::Context
Definition:
opencl.hh:30
Generated by
1.8.15