summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/clear.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/clear.cpp')
-rw-r--r--src/osd/modules/render/bgfx/clear.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/clear.cpp b/src/osd/modules/render/bgfx/clear.cpp
new file mode 100644
index 00000000000..2e6b27a4fe3
--- /dev/null
+++ b/src/osd/modules/render/bgfx/clear.cpp
@@ -0,0 +1,22 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// clear.cpp - View clear info for a BGFX chain entry
+//
+//============================================================
+
+#include "clear.h"
+
+clear_state::clear_state(uint64_t flags, uint32_t color, float depth, uint8_t stencil)
+ : m_flags(flags)
+ , m_color(color)
+ , m_depth(depth)
+ , m_stencil(stencil)
+{
+}
+
+void clear_state::bind(int view) const
+{
+ bgfx::setViewClear(view, m_flags, m_color, m_depth, m_stencil);
+}