summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/effectreader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/effectreader.h')
-rw-r--r--src/osd/modules/render/bgfx/effectreader.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/osd/modules/render/bgfx/effectreader.h b/src/osd/modules/render/bgfx/effectreader.h
index 0bc1b334435..db590e5eeb3 100644
--- a/src/osd/modules/render/bgfx/effectreader.h
+++ b/src/osd/modules/render/bgfx/effectreader.h
@@ -6,25 +6,38 @@
//
//============================================================
+#ifndef MAME_RENDER_BGFX_EFFECTREADER_H
+#define MAME_RENDER_BGFX_EFFECTREADER_H
+
#pragma once
-#ifndef __DRAWBGFX_EFFECT_READER__
-#define __DRAWBGFX_EFFECT_READER__
+#include "statereader.h"
+
+#include <bgfx/bgfx.h>
+#include <memory>
#include <string>
+#include <vector>
-#include "statereader.h"
class bgfx_effect;
+class bgfx_uniform;
+class osd_options;
class shader_manager;
+
class effect_reader : public state_reader
{
public:
- static bgfx_effect* read_from_value(const Value& value, std::string prefix, shader_manager& shaders);
+ static std::unique_ptr<bgfx_effect> read_from_value(const std::string &name, const Value& value, const std::string &prefix, const osd_options &options, shader_manager& shaders);
+ static bool validate_value(const Value& value, const std::string &prefix, const osd_options &options);
private:
- static bool validate_parameters(const Value& value, std::string prefix);
+ static bool get_base_effect_data(const Value& value, const std::string &prefix, uint64_t &flags, std::string &vertex_name, std::string &fragment_name,
+ std::vector<std::unique_ptr<bgfx_uniform> > &uniforms);
+ static bool get_shader_data(const Value& value, const osd_options &options, shader_manager &shaders, std::string &vertex_name, bgfx::ShaderHandle &vertex_shader,
+ std::string &fragment_name, bgfx::ShaderHandle &fragment_shader);
+ static bool validate_parameters(const Value& value, const std::string &prefix);
};
-#endif // __DRAWBGFX_EFFECT_READER__
+#endif // MAME_RENDER_BGFX_EFFECTREADER_H