Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
83418ac3
Commit
83418ac3
authored
May 03, 2019
by
chili
Browse files
fix flickering bug
parent
9927aeba
Changes
1
Hide whitespace changes
Inline
Side-by-side
hw3d/Box.cpp
View file @
83418ac3
...
@@ -76,9 +76,10 @@ void Box::SpawnControlWindow( int id,Graphics& gfx ) noexcept
...
@@ -76,9 +76,10 @@ void Box::SpawnControlWindow( int id,Graphics& gfx ) noexcept
bool
dirty
=
false
;
bool
dirty
=
false
;
if
(
ImGui
::
Begin
(
(
"Box "
s
+
std
::
to_string
(
id
)).
c_str
()
)
)
if
(
ImGui
::
Begin
(
(
"Box "
s
+
std
::
to_string
(
id
)).
c_str
()
)
)
{
{
dirty
=
dirty
||
ImGui
::
ColorEdit3
(
"Material Color"
,
&
materialConstants
.
color
.
x
);
const
auto
cd
=
ImGui
::
ColorEdit3
(
"Material Color"
,
&
materialConstants
.
color
.
x
);
dirty
=
dirty
||
ImGui
::
SliderFloat
(
"Specular Intensity"
,
&
materialConstants
.
specularIntensity
,
0.05
f
,
4.0
f
,
"%.2f"
,
2
);
const
auto
sid
=
ImGui
::
SliderFloat
(
"Specular Intensity"
,
&
materialConstants
.
specularIntensity
,
0.05
f
,
4.0
f
,
"%.2f"
,
2
);
dirty
=
dirty
||
ImGui
::
SliderFloat
(
"Specular Power"
,
&
materialConstants
.
specularPower
,
1.0
f
,
200.0
f
,
"%.2f"
,
2
);
const
auto
spd
=
ImGui
::
SliderFloat
(
"Specular Power"
,
&
materialConstants
.
specularPower
,
1.0
f
,
200.0
f
,
"%.2f"
,
2
);
dirty
=
cd
||
sid
||
spd
;
}
}
ImGui
::
End
();
ImGui
::
End
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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