Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lava-vr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
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
lava
lava-vr
Commits
d492138b
Commit
d492138b
authored
6 years ago
by
Christian Mattes
Browse files
Options
Downloads
Patches
Plain Diff
Made multiple imguis possible
parent
078da71f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lava-vr/VRImgui.cc
+2
-1
2 additions, 1 deletion
src/lava-vr/VRImgui.cc
src/lava-vr/VRImgui.hh
+4
-1
4 additions, 1 deletion
src/lava-vr/VRImgui.hh
with
6 additions
and
2 deletions
src/lava-vr/VRImgui.cc
+
2
−
1
View file @
d492138b
...
...
@@ -112,6 +112,7 @@ void VRImgui::update(const glm::mat4 &screenPose,
vmouse
.
z
*=
mHeight
*
pixels_per_meter
;
mVMouse
=
vmouse
;
mImgui
->
makeCurrent
();
auto
&
io
=
::
ImGui
::
GetIO
();
if
(
pointer
.
y
>
-
0.1
f
&&
pointer
.
y
<
0.1
f
)
{
...
...
@@ -153,7 +154,7 @@ bool VRImgui::visible() const
bool
VRImgui
::
enabled
()
const
{
return
mCurrentOpacity
>
0.5
f
&&
mTargetOpacity
>
0.5
f
;
return
!
mBlocked
&&
mCurrentOpacity
>
0.5
f
&&
mTargetOpacity
>
0.5
f
;
}
}
// namespace vr
...
...
This diff is collapsed.
Click to expand it.
src/lava-vr/VRImgui.hh
+
4
−
1
View file @
d492138b
...
...
@@ -47,9 +47,11 @@ class VRImgui {
/// you can skip recording widgets if this returns false
bool
visible
()
const
;
/// returns true if the ImGui is accepting input (due to fading state)
/// returns true if the ImGui is accepting input (due to fading state
, or being blocked
)
bool
enabled
()
const
;
void
setBlocked
(
bool
val
)
{
mBlocked
=
val
;
};
protected
:
SharedGraphicsPipeline
mPipeline
;
SharedDescriptorSet
mDescriptor
;
...
...
@@ -57,6 +59,7 @@ class VRImgui {
float
mCurrentOpacity
=
1.0
f
,
mTargetOpacity
=
1.0
f
;
glm
::
mat4
mPose
;
glm
::
vec3
mVMouse
;
bool
mBlocked
=
false
;
imgui
::
UniqueImGui
mImgui
;
};
...
...
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