summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/effect.h
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-02-18 15:57:34 +0100
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-02-21 03:03:23 +0100
commit9a47a870df619656e9092f2f77622e84e640307a (patch)
treeb8640bf79ffb55d0c9ed6fc27bbd4ce16a5e1a2e /src/osd/modules/render/bgfx/effect.h
parentdadf8e7d79696996ab3ef840fe99a588ede538fa (diff)
First take on render API reorg, nw
Diffstat (limited to 'src/osd/modules/render/bgfx/effect.h')
-rw-r--r--src/osd/modules/render/bgfx/effect.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/effect.h b/src/osd/modules/render/bgfx/effect.h
new file mode 100644
index 00000000000..440a38252ce
--- /dev/null
+++ b/src/osd/modules/render/bgfx/effect.h
@@ -0,0 +1,32 @@
+#pragma once
+
+#ifndef __DRAWBGFX_EFFECT__
+#define __DRAWBGFX_EFFECT__
+
+#include <bgfx/bgfx.h>
+
+#include <string>
+#include <vector>
+#include <map>
+
+#include "uniform.h"
+
+class bgfx_effect
+{
+public:
+ bgfx_effect(uint64_t state, bgfx::ShaderHandle vertexShader, bgfx::ShaderHandle fragmentShader, std::vector<bgfx_uniform*> uniforms);
+ ~bgfx_effect();
+
+ void submit(int view);
+
+ // Getters
+ bgfx_uniform* uniform(std::string name);
+ bgfx::ProgramHandle get_program() const { return m_program_handle; }
+
+private:
+ uint64_t m_state;
+ bgfx::ProgramHandle m_program_handle;
+ std::map<std::string, bgfx_uniform*> m_uniforms;
+};
+
+#endif // __DRAWBGFX_EFFECT__ \ No newline at end of file