summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/uniformreader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/uniformreader.h')
-rw-r--r--src/osd/modules/render/bgfx/uniformreader.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/uniformreader.h b/src/osd/modules/render/bgfx/uniformreader.h
new file mode 100644
index 00000000000..850508fa6da
--- /dev/null
+++ b/src/osd/modules/render/bgfx/uniformreader.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#ifndef __DRAWBGFX_UNIFORM_READER__
+#define __DRAWBGFX_UNIFORM_READER__
+
+#include <bgfx/bgfx.h>
+
+#include "statereader.h"
+
+class bgfx_uniform;
+
+enum uniform_type
+{
+ TYPE_INT1 = bgfx::UniformType::Int1,
+ TYPE_VEC4 = bgfx::UniformType::Vec4,
+ TYPE_MAT3 = bgfx::UniformType::Mat3,
+ TYPE_MAT4 = bgfx::UniformType::Mat4,
+ TYPE_CAMERA, // Alias for the current ortho camera, used to auto-bind on material load
+
+ TYPE_COUNT = 5
+};
+
+class uniform_reader : public state_reader
+{
+public:
+ static bgfx_uniform* read_from_value(const Value& value);
+
+private:
+ static const int TYPE_COUNT = uniform_type::TYPE_COUNT;
+ static const string_to_enum TYPE_NAMES[TYPE_COUNT];
+};
+
+#endif // __DRAWBGFX_UNIFORM_READER__ \ No newline at end of file