gfx-shader-param: FIXME Don't create parameters for invisible

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2019-12-18 07:49:43 +01:00
parent de473f0c2e
commit 24edee795a

View file

@ -30,6 +30,13 @@ std::shared_ptr<gfx::shader::parameter> gfx::shader::parameter::make_parameter(g
if (!param) if (!param)
return nullptr; return nullptr;
// ToDo: Allow other parameters to specify hidden properties, as well as the shader itself, and the source/filter/transition.
if (auto anno = param.get_annotation("visible"); anno != nullptr) {
if (!anno.get_default_bool()) {
return nullptr;
}
}
typedef gs::effect_parameter::type eptype; typedef gs::effect_parameter::type eptype;
switch (param.get_type()) { switch (param.get_type()) {
case eptype::Boolean: { case eptype::Boolean: {