summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/chainentry.cpp
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-02-18 18:11:42 +0100
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-02-21 03:03:24 +0100
commit09f03905fd7400f90b79e346f2f2d94d7c4ce789 (patch)
tree4451d4b77648975fdc835e391d7dfd49cdac6d3b /src/osd/modules/render/bgfx/chainentry.cpp
parent9a47a870df619656e9092f2f77622e84e640307a (diff)
More reshuffling, nw
Diffstat (limited to 'src/osd/modules/render/bgfx/chainentry.cpp')
-rw-r--r--src/osd/modules/render/bgfx/chainentry.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/chainentry.cpp b/src/osd/modules/render/bgfx/chainentry.cpp
new file mode 100644
index 00000000000..7121d88cbe6
--- /dev/null
+++ b/src/osd/modules/render/bgfx/chainentry.cpp
@@ -0,0 +1,33 @@
+#include "emu.h"
+
+#include <bgfx/bgfx.h>
+
+#include "effect.h"
+#include "texture.h"
+#include "target.h"
+#include "chainentry.h"
+
+bgfx_chain_entry::bgfx_chain_entry(std::string name, bgfx_effect* effect, std::vector<bgfx_input_pair>& inputs, bgfx_target* output)
+ : m_name(name)
+ , m_effect(effect)
+ , m_output(output)
+{
+ for (bgfx_input_pair input : inputs)
+ {
+ m_inputs.push_back(input);
+ }
+}
+
+bgfx_chain_entry::~bgfx_chain_entry()
+{
+}
+
+void bgfx_chain_entry::submit(render_primitive* prim, int view)
+{
+ for (bgfx_input_pair input : m_inputs)
+ {
+ input.bind(m_effect);
+ }
+ bgfx::setViewFrameBuffer(view, m_output->target());
+ m_effect->submit(view);
+}