obs-StreamFX/source/obs/gs/gs-effect.hpp
Michael Fabian 'Xaymar' Dirks 5a3954ae0e project: Fix License, License headers and Copyright information
Fixes several files incorrectly stated a different license from the actual project, as well as the copyright headers included in all files. This change has no effect on the licensing terms, it should clear up a bit of confusion by contributors. Plus the files get a bit smaller, and we have less duplicated information across the entire project.

Overall the project is GPLv2 if not built with Qt, and GPLv3 if it is built with Qt. There are no parts licensed under a different license, all have been adapted from other compatible licenses into GPLv2 or GPLv3.
2023-04-05 18:59:08 +02:00

56 lines
1.8 KiB
C++

// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2019-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// Copyright (C) 2022 lainon <GermanAizek@yandex.ru>
// AUTOGENERATED COPYRIGHT HEADER END
#pragma once
#include "common.hpp"
#include "gs-effect-parameter.hpp"
#include "gs-effect-technique.hpp"
#include "warning-disable.hpp"
#include <filesystem>
#include <list>
#include "warning-enable.hpp"
namespace streamfx::obs::gs {
class effect : public std::shared_ptr<gs_effect_t> {
public:
effect() = default;
effect(std::string_view code, std::string_view name);
effect(std::filesystem::path file);
~effect();
std::size_t count_techniques();
streamfx::obs::gs::effect_technique get_technique(std::size_t idx);
streamfx::obs::gs::effect_technique get_technique(std::string_view name);
bool has_technique(std::string_view name);
std::size_t count_parameters();
streamfx::obs::gs::effect_parameter get_parameter(std::size_t idx);
streamfx::obs::gs::effect_parameter get_parameter(std::string_view name);
bool has_parameter(std::string_view name);
bool has_parameter(std::string_view name, effect_parameter::type type);
public /* Legacy Support */:
inline gs_effect_t* get_object()
{
return get();
}
static streamfx::obs::gs::effect create(std::string_view code, std::string_view name)
{
return streamfx::obs::gs::effect(code, name);
};
static streamfx::obs::gs::effect create(std::string_view file)
{
return streamfx::obs::gs::effect(std::filesystem::path(file));
};
static streamfx::obs::gs::effect create(const std::filesystem::path& file)
{
return streamfx::obs::gs::effect(file);
};
};
} // namespace streamfx::obs::gs