Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Glow
glow-extras
Commits
66da7d34
Commit
66da7d34
authored
Mar 24, 2020
by
Philip Trettner
Browse files
fixed global config changes inside interactive viewers
parent
e25c1ab7
Changes
4
Hide whitespace changes
Inline
Side-by-side
viewer/glow-extras/viewer/ViewerApp.hh
View file @
66da7d34
...
...
@@ -62,7 +62,7 @@ private:
detail
::
shared_command_queue
const
mStaticCommandQueue
;
/// Whether mStaticCommandQueue contains interactive parts. If false, the layout does not require a rebuild each frame
bool
const
mIsInteractive
;
detail
::
global_settings
const
mSettings
;
detail
::
global_settings
const
&
mSettings
;
/// A subview data cache, keys are x/y upper left corner
std
::
unordered_map
<
tg
::
ipos2
,
SubViewData
>
mSubViewDataCache
;
...
...
viewer/glow-extras/viewer/configure.cc
View file @
66da7d34
...
...
@@ -55,8 +55,8 @@ void configure(Renderable&, infinite_accumulation_t b)
}
void
configure
(
Renderable
&
r
,
maybe_empty_t
)
{
r
.
setCanBeEmpty
();
}
void
configure
(
Renderable
&
,
no_left_mouse_control_t
)
{
detail
::
set_left_mouse_control
(
fals
e
);
}
void
configure
(
Renderable
&
,
no_right_mouse_control_t
)
{
detail
::
set_right_mouse_control
(
fals
e
);
}
void
configure
(
Renderable
&
,
no_left_mouse_control_t
b
)
{
detail
::
set_left_mouse_control
(
!
b
.
activ
e
);
}
void
configure
(
Renderable
&
,
no_right_mouse_control_t
b
)
{
detail
::
set_right_mouse_control
(
!
b
.
activ
e
);
}
void
configure
(
Renderable
&
,
controls_2d_t
b
)
{
detail
::
set_2d_controls
(
b
.
active
);
}
void
configure
(
Renderable
&
,
dark_ui_t
b
)
{
detail
::
set_ui_darkmode
(
b
.
active
);
}
...
...
viewer/glow-extras/viewer/configure.hh
View file @
66da7d34
...
...
@@ -103,8 +103,8 @@ inline auto constexpr backface_culling = backface_culling_t{};
// passthrough configures for scene modification commands
void
configure
(
Renderable
&
,
no_grid_t
b
);
void
configure
(
Renderable
&
,
no_shadow_t
);
void
configure
(
Renderable
&
,
no_left_mouse_control_t
);
void
configure
(
Renderable
&
,
no_right_mouse_control_t
);
void
configure
(
Renderable
&
,
no_left_mouse_control_t
b
);
void
configure
(
Renderable
&
,
no_right_mouse_control_t
b
);
void
configure
(
Renderable
&
,
print_mode_t
b
);
void
configure
(
Renderable
&
,
maybe_empty_t
);
void
configure
(
Renderable
&
,
no_outline_t
b
);
...
...
viewer/glow-extras/viewer/detail/config_structs_impl.hh
View file @
66da7d34
...
...
@@ -35,9 +35,13 @@ struct maybe_empty_t
};
struct
no_left_mouse_control_t
{
bool
active
=
true
;
no_left_mouse_control_t
operator
()(
bool
a
)
const
{
return
{
a
};
}
};
struct
no_right_mouse_control_t
{
bool
active
=
true
;
no_right_mouse_control_t
operator
()(
bool
a
)
const
{
return
{
a
};
}
};
struct
no_fresnel_t
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment