Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glow-extras
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glow
glow-extras
Commits
59b7b81f
Commit
59b7b81f
authored
1 year ago
by
Nils Speetzen
Browse files
Options
Downloads
Patches
Plain Diff
clang format
parent
fadd3bab
Branches
Branches containing commit
No related tags found
1 merge request
!134
Add configure option cache_window_size
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
viewer/glow-extras/viewer/ViewerApp.cc
+1
-1
1 addition, 1 deletion
viewer/glow-extras/viewer/ViewerApp.cc
viewer/glow-extras/viewer/detail/command_queue.cc
+13
-12
13 additions, 12 deletions
viewer/glow-extras/viewer/detail/command_queue.cc
with
14 additions
and
13 deletions
viewer/glow-extras/viewer/ViewerApp.cc
+
1
−
1
View file @
59b7b81f
This diff is collapsed.
Click to expand it.
viewer/glow-extras/viewer/detail/command_queue.cc
+
13
−
12
View file @
59b7b81f
#include
"command_queue.hh"
#include
<variant>
#include
<filesystem>
#include
<variant>
#include
<glow-extras/viewer/ViewerApp.hh>
#include
<glow-extras/viewer/view.hh>
...
...
@@ -98,7 +98,7 @@ void glow::viewer::detail::on_last_command()
}
}
bool
glow
::
viewer
::
detail
::
is_interactive
(
const
glow
::
viewer
::
detail
::
command_queue
&
commands
)
bool
glow
::
viewer
::
detail
::
is_interactive
(
glow
::
viewer
::
detail
::
command_queue
const
&
commands
)
{
for
(
auto
const
&
cmd
:
commands
)
if
(
cmd
.
instr
==
detail
::
command
::
instruction
::
InteractiveSubview
)
...
...
@@ -107,7 +107,7 @@ bool glow::viewer::detail::is_interactive(const glow::viewer::detail::command_qu
return
false
;
}
void
glow
::
viewer
::
detail
::
create_layout_tree
(
glow
::
viewer
::
layout
::
tree_node
&
rootNode
,
const
glow
::
viewer
::
detail
::
command_queue
&
commands
,
float
deltaTime
,
bool
allowInteractiveExecute
)
void
glow
::
viewer
::
detail
::
create_layout_tree
(
glow
::
viewer
::
layout
::
tree_node
&
rootNode
,
glow
::
viewer
::
detail
::
command_queue
const
&
commands
,
float
deltaTime
,
bool
allowInteractiveExecute
)
{
using
cmd_t
=
detail
::
command
;
...
...
@@ -117,7 +117,7 @@ void glow::viewer::detail::create_layout_tree(glow::viewer::layout::tree_node& r
if
(
cmd
.
instr
==
cmd_t
::
instruction
::
AddRenderjob
)
{
TG_ASSERT
(
currentNode
!=
nullptr
);
const
auto
renderable
=
cmd
.
data_renderable
;
auto
const
renderable
=
cmd
.
data_renderable
;
TG_ASSERT
(
renderable
);
renderable
->
runLazyInit
();
currentNode
->
scene
.
add
(
renderable
);
...
...
@@ -125,7 +125,7 @@ void glow::viewer::detail::create_layout_tree(glow::viewer::layout::tree_node& r
else
if
(
cmd
.
instr
==
cmd_t
::
instruction
::
ModifyScene
)
{
TG_ASSERT
(
currentNode
!=
nullptr
);
const
auto
funcp
=
cmd
.
data_scene
;
auto
const
funcp
=
cmd
.
data_scene
;
TG_ASSERT
(
funcp
);
funcp
(
currentNode
->
scene
);
}
...
...
@@ -160,7 +160,7 @@ void glow::viewer::detail::create_layout_tree(glow::viewer::layout::tree_node& r
else
if
(
cmd
.
instr
==
cmd_t
::
instruction
::
ModifyLayout
)
{
TG_ASSERT
(
currentNode
!=
nullptr
);
const
auto
layoutSettings
=
cmd
.
data_settings
;
auto
const
layoutSettings
=
cmd
.
data_settings
;
currentNode
->
layoutSettings
=
layoutSettings
;
}
else
if
(
TG_LIKELY
(
cmd
.
instr
==
cmd_t
::
instruction
::
InteractiveSubview
&&
allowInteractiveExecute
))
...
...
@@ -174,7 +174,7 @@ void glow::viewer::detail::create_layout_tree(glow::viewer::layout::tree_node& r
// Run the interactive lambda to fill innerCommandQueue
{
sCommandQueueStack
.
push_back
(
innerCommandQueue
);
const
auto
funcp
=
cmd
.
data_interactive
;
auto
const
funcp
=
cmd
.
data_interactive
;
TG_ASSERT
(
funcp
);
funcp
(
deltaTime
);
sCommandQueueStack
.
pop_back
();
...
...
@@ -267,7 +267,6 @@ void glow::viewer::detail::reset_camera_to_scene(bool clip_cam)
sCurrentViewerApp
->
resetCameraToSceneNextFrame
(
clip_cam
);
}
bool
glow
::
viewer
::
detail
::
is_fullscreen
()
{
if
(
nullptr
==
sCurrentViewerApp
)
...
...
@@ -289,7 +288,7 @@ void glow::viewer::detail::toggle_fullscreen()
return
sCurrentViewerApp
->
toggleFullscreen
();
}
void
glow
::
viewer
::
detail
::
set_file_drop_handler
(
std
::
function
<
void
(
const
std
::
vector
<
std
::
string
>&
)
>
callback
)
void
glow
::
viewer
::
detail
::
set_file_drop_handler
(
std
::
function
<
void
(
std
::
vector
<
std
::
string
>
const
&
)
>
callback
)
{
sGlobalSettings
.
onDropFiles
=
std
::
move
(
callback
);
}
...
...
@@ -298,9 +297,11 @@ void glow::viewer::detail::set_cache_window_size_folder(std::string_view s)
{
auto
&
folder
=
sGlobalSettings
.
cacheWindowSizeFolder
;
folder
=
s
;
if
(
folder
.
empty
())
return
;
if
(
folder
.
empty
())
return
;
if
(
!
folder
.
ends_with
(
"/"
))
folder
.
append
(
"/"
);
if
(
!
folder
.
ends_with
(
"/"
))
folder
.
append
(
"/"
);
if
(
!
std
::
filesystem
::
exists
(
folder
))
{
glow
::
warning
()
<<
"Target folder for window size caching does not exist! Defaulting to working directory."
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment