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
424a1320
Commit
424a1320
authored
Jan 14, 2019
by
chili
Browse files
move ClearBuffer def into .cpp
parent
6554f8c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
hw3d/Graphics.cpp
View file @
424a1320
...
...
@@ -71,3 +71,9 @@ void Graphics::EndFrame()
{
pSwap
->
Present
(
1u
,
0u
);
}
void
Graphics
::
ClearBuffer
(
float
red
,
float
green
,
float
blue
)
noexcept
{
const
float
color
[]
=
{
red
,
green
,
blue
,
1.0
f
};
pContext
->
ClearRenderTargetView
(
pTarget
,
color
);
}
hw3d/Graphics.h
View file @
424a1320
...
...
@@ -10,11 +10,7 @@ public:
Graphics
&
operator
=
(
const
Graphics
&
)
=
delete
;
~
Graphics
();
void
EndFrame
();
void
ClearBuffer
(
float
red
,
float
green
,
float
blue
)
noexcept
{
const
float
color
[]
=
{
red
,
green
,
blue
,
1.0
f
};
pContext
->
ClearRenderTargetView
(
pTarget
,
color
);
}
void
ClearBuffer
(
float
red
,
float
green
,
float
blue
)
noexcept
;
private:
ID3D11Device
*
pDevice
=
nullptr
;
IDXGISwapChain
*
pSwap
=
nullptr
;
...
...
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