summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/inputpair.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/inputpair.cpp')
-rw-r--r--src/osd/modules/render/bgfx/inputpair.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/inputpair.cpp b/src/osd/modules/render/bgfx/inputpair.cpp
new file mode 100644
index 00000000000..0077180c0de
--- /dev/null
+++ b/src/osd/modules/render/bgfx/inputpair.cpp
@@ -0,0 +1,15 @@
+#include "inputpair.h"
+#include "texture.h"
+#include "effect.h"
+
+bgfx_input_pair::bgfx_input_pair(int index, std::string sampler, bgfx_texture* texture)
+ : m_index(index)
+ , m_sampler(sampler)
+ , m_texture(texture)
+{
+}
+
+void bgfx_input_pair::bind(bgfx_effect *effect)
+{
+ bgfx::setTexture(m_index, effect->uniform(m_sampler)->handle(), m_texture->handle());
+} \ No newline at end of file