gfx-shader: Rename from gfx-effect-source

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2019-12-15 09:05:44 +01:00
parent 738b08de36
commit 0ad896e905
13 changed files with 19 additions and 14 deletions

View file

@ -294,8 +294,6 @@ set(PROJECT_PRIVATE_SOURCE
"${PROJECT_SOURCE_DIR}/source/util-memory.cpp" "${PROJECT_SOURCE_DIR}/source/util-memory.cpp"
# Graphics # Graphics
"${PROJECT_SOURCE_DIR}/source/gfx/gfx-effect-source.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/gfx-effect-source.cpp"
"${PROJECT_SOURCE_DIR}/source/gfx/gfx-source-texture.hpp" "${PROJECT_SOURCE_DIR}/source/gfx/gfx-source-texture.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/gfx-source-texture.cpp" "${PROJECT_SOURCE_DIR}/source/gfx/gfx-source-texture.cpp"
# Graphics/Blur # Graphics/Blur
@ -311,6 +309,19 @@ set(PROJECT_PRIVATE_SOURCE
"${PROJECT_SOURCE_DIR}/source/gfx/blur/gfx-blur-gaussian.cpp" "${PROJECT_SOURCE_DIR}/source/gfx/blur/gfx-blur-gaussian.cpp"
"${PROJECT_SOURCE_DIR}/source/gfx/blur/gfx-blur-gaussian-linear.hpp" "${PROJECT_SOURCE_DIR}/source/gfx/blur/gfx-blur-gaussian-linear.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/blur/gfx-blur-gaussian-linear.cpp" "${PROJECT_SOURCE_DIR}/source/gfx/blur/gfx-blur-gaussian-linear.cpp"
# Graphics/Shader
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader.cpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param.cpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param-audio.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param-audio.cpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param-basic.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param-basic.cpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param-matrix.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param-matrix.cpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param-texture.hpp"
"${PROJECT_SOURCE_DIR}/source/gfx/shader/gfx-shader-param-texture.cpp"
# OBS # OBS
"${PROJECT_SOURCE_DIR}/source/obs/gs/gs-helper.hpp" "${PROJECT_SOURCE_DIR}/source/obs/gs/gs-helper.hpp"

View file

View file

View file

@ -48,7 +48,7 @@ extern "C" {
namespace gfx { namespace gfx {
namespace effect_source { namespace effect_source {
enum class value_mode { /* enum class value_mode {
INPUT, INPUT,
SLIDER, SLIDER,
}; };
@ -274,9 +274,11 @@ namespace gfx {
typedef std::pair<gs::effect_parameter::type, std::string> param_ident_t; typedef std::pair<gs::effect_parameter::type, std::string> param_ident_t;
typedef std::function<bool(std::shared_ptr<gs::effect_parameter> param)> valid_property_cb_t; typedef std::function<bool(std::shared_ptr<gs::effect_parameter> param)> valid_property_cb_t;
typedef std::function<void(std::shared_ptr<gs::effect> effect)> param_override_cb_t; typedef std::function<void(std::shared_ptr<gs::effect> effect)> param_override_cb_t;
*/
class effect_source : public std::enable_shared_from_this<effect_source> { class effect_source {
obs_source_t* _self; // Shader
std::string _source_file;
std::shared_ptr<gs::effect> _effect;
std::string _file; std::string _file;
std::shared_ptr<gs::effect> _effect; std::shared_ptr<gs::effect> _effect;
@ -297,9 +299,6 @@ namespace gfx {
std::uniform_real_distribution<float_t> _random_dist{0.f, 1.f}; std::uniform_real_distribution<float_t> _random_dist{0.f, 1.f};
std::default_random_engine _random_generator; std::default_random_engine _random_generator;
valid_property_cb_t _cb_valid;
param_override_cb_t _cb_override;
void load_file(std::string file); void load_file(std::string file);
public: public:
@ -318,11 +317,6 @@ namespace gfx {
void enum_active_sources(obs_source_enum_proc_t, void*); void enum_active_sources(obs_source_enum_proc_t, void*);
public:
void set_valid_property_cb(valid_property_cb_t cb);
void set_override_cb(param_override_cb_t cb);
bool modified2(obs_properties_t* props, obs_property_t* property, obs_data_t* settings); bool modified2(obs_properties_t* props, obs_property_t* property, obs_data_t* settings);
}; };
} // namespace effect_source } // namespace effect_source