summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/paramuniform.cpp
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-03-23 17:55:55 +0100
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-03-23 17:55:55 +0100
commitba0a1d8d5218804bc1d5b09d5b3fa8fcd537f0bf (patch)
tree9fe5ca6f9f6352f724ea9a26fff5ebda23576607 /src/osd/modules/render/bgfx/paramuniform.cpp
parentd0867ac3f2bdcfd4d1d2361ce8b6408a185908f4 (diff)
parent5ed9f938ea322d386e949d2752892651d9ee9fde (diff)
Merge bgfx_shader into master, nw
Diffstat (limited to 'src/osd/modules/render/bgfx/paramuniform.cpp')
-rw-r--r--src/osd/modules/render/bgfx/paramuniform.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/paramuniform.cpp b/src/osd/modules/render/bgfx/paramuniform.cpp
new file mode 100644
index 00000000000..c318f2ff01c
--- /dev/null
+++ b/src/osd/modules/render/bgfx/paramuniform.cpp
@@ -0,0 +1,23 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// paramuniform.cpp - BGFX shader chain parametric uniform
+//
+//============================================================
+
+#include "paramuniform.h"
+
+#include "parameter.h"
+
+bgfx_param_uniform::bgfx_param_uniform(bgfx_uniform* uniform, bgfx_parameter* param)
+ : bgfx_entry_uniform(uniform)
+ , m_param(param)
+{
+}
+
+void bgfx_param_uniform::bind()
+{
+ float value = m_param->value();
+ m_uniform->set(&value, sizeof(float));
+}